Skip to content

Commit

Permalink
maven
Browse files Browse the repository at this point in the history
  • Loading branch information
yhyzgn committed May 12, 2023
1 parent 77073cb commit 0d0e328
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 7 deletions.
8 changes: 6 additions & 2 deletions router-annotation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ tasks.withType(JavaCompile) {

publishing {
publications {
maven(MavenPublication) {
release(MavenPublication) {
groupId = "${group}"
artifactId = "router-annotation"
artifactId = "${project.name}"
version = "2.0.6"
afterEvaluate {
from components.java
}
}
}
// 发布的仓库配置
repositories {
mavenLocal()
maven {
url "https://jitpack.io"
}
Expand Down
9 changes: 6 additions & 3 deletions router-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,20 @@ tasks.withType(JavaCompile) {

publishing {
publications {
maven(MavenPublication) {
release(MavenPublication) {
groupId = "${group}"
artifactId = "router-compiler"
artifactId = "${project.name}"
version = "2.0.6"
afterEvaluate {
from components.java
}
}
}
// 发布的仓库配置
repositories {
mavenLocal()
maven {
url "https://jitpack.io"
}
}
}

18 changes: 16 additions & 2 deletions router/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ android {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

lint {
abortOnError false
checkReleaseBuilds false
}

publishing {
singleVariant("release")
}
}

dependencies {
Expand All @@ -50,16 +55,25 @@ tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

task generateSourcesJar(type: Jar) {
from android.sourceSets.main
archiveClassifier = 'sources'
}

publishing {
publications {
maven(MavenPublication) {
release(MavenPublication) {
groupId = "${group}"
artifactId = "router"
artifactId = "${project.name}"
version = "2.0.6"
afterEvaluate {
from components.release
}
}
}
// 发布的仓库配置
repositories {
mavenLocal()
maven {
url "https://jitpack.io"
}
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pluginManagement {
repositories {
mavenLocal()
maven { url 'https://jitpack.io' }
maven { url "https://maven.aliyun.com/repository/public" }
mavenCentral()
Expand All @@ -11,6 +12,7 @@ pluginManagement {
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenLocal()
maven { url 'https://jitpack.io' }
maven { url "https://maven.aliyun.com/repository/public" }
mavenCentral()
Expand Down

0 comments on commit 0d0e328

Please sign in to comment.