Skip to content

Commit

Permalink
maven publish fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydroid1024 committed Sep 19, 2021
1 parent 8ee11bc commit 22cdbf7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
13 changes: 1 addition & 12 deletions anyby/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
group = "anyby"
apply from: "../common.gradle"

dependencies {
api(project(":vbhelper"))
// implementation 'com.github.jaydroid1024:VBHelper:0.0.1'
}
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
from components.release
groupId = 'com.jay.android'
artifactId = 'anyby'
}
}
}
}
17 changes: 17 additions & 0 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,20 @@ dependencies {
androidTestImplementation rootProject.ext.espressoCore
}

// 唯一标识 每个组件都要指定
def ARTIFACT_ID = group.toString()

afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
println ARTIFACT_ID
from components.release
groupId = 'com.github.jaydroid1024'
artifactId = ARTIFACT_ID
}
}
}
}

13 changes: 1 addition & 12 deletions vbhelper/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
group = "vbhelper"
apply from: "../common.gradle"

dependencies {

}

afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
from components.release
groupId = 'com.github.jaydroid1024'
artifactId = 'vbhelper'
}
}
}
}

0 comments on commit 22cdbf7

Please sign in to comment.