Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have 2 different project build on mvn. I am trying to replace to Gradle.

Project 1 is an SDK, and project 2 is using that sdk (example).

In the time of maven it creates artifact using mvn install which adds the whole project into local repository.

I like to work in gradle like that. I like project 1 build.gradle need to post it as a gradle local repository and then example project need to use it.

In maven we do mvn install which adds a project artifact into .m2 folder but how to do in gradle so what i can add a project artefact's into the local repository.

Any way that I can do so?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.4k views
Welcome To Ask or Share your Answers For Others

1 Answer

sdk/build.gradle:

apply plugin: "maven"

group = "foo"
version = "1.0"

example/build.gradle:

repositories {
    mavenLocal()
}

dependencies {
    compile "foo:sdk:1.0"
}

$sdk> gradle install

$example> gradle build

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...