Skip to content

Commit b29e643

Browse files
author
wangshuwen15222
committed
feat:整理示例工程&&readme
1 parent 564066e commit b29e643

File tree

6 files changed

+31
-15
lines changed

6 files changed

+31
-15
lines changed

app/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ dependencies {
4040
implementation fileTree(dir: 'libs', include: ['*.jar'])
4141
implementation 'androidx.appcompat:appcompat:1.1.0'
4242
implementation project(':m_test')
43-
implementation project(":xrouter_core")
44-
annotationProcessor project(':xrouter_compiler')
45-
// implementation 'cn.cheney.xrouter:core:1.0.3'
46-
// annotationProcessor 'cn.cheney.xrouter:compiler:1.0.3'
43+
if (debug == "true") {
44+
implementation project(":xrouter_core")
45+
annotationProcessor project(':xrouter_compiler')
46+
} else {
47+
implementation "cn.cheney.xrouter:core:$sdkVersion"
48+
annotationProcessor "cn.cheney.xrouter:compiler:$sdkVersion"
49+
}
4750
}

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1616
# https://developer.android.com/topic/libraries/support-library/androidx-rn
1717
android.useAndroidX=true
1818
# Automatically convert third-party libraries to use AndroidX
19-
android.enableJetifier=true
19+
android.enableJetifier=true
20+
21+
debug = true
22+
sdkVersion = 1.0.4

m_test/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ android {
3232
dependencies {
3333
implementation fileTree(dir: 'libs', include: ['*.jar'])
3434
implementation 'androidx.appcompat:appcompat:1.1.0'
35-
implementation project(":xrouter_core")
36-
annotationProcessor project(':xrouter_compiler')
37-
// implementation 'cn.cheney.xrouter:core:1.0.3'
38-
// annotationProcessor 'cn.cheney.xrouter:compiler:1.0.3'
35+
if (debug == "true") {
36+
implementation project(":xrouter_core")
37+
annotationProcessor project(':xrouter_compiler')
38+
} else {
39+
implementation "cn.cheney.xrouter:core:$sdkVersion"
40+
annotationProcessor "cn.cheney.xrouter:compiler:$sdkVersion"
41+
}
3942
}

xrouter_annotation/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'java-library'
33
ext {
44
PUBLISH_GROUP_ID = "io.github.wangshuwen1107"
55
PUBLISH_ARTIFACT_ID = 'xrouter-annotation'
6-
PUBLISH_VERSION = '1.0.4'
6+
PUBLISH_VERSION = "$sdkVersion"
77
}
88
apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"
99

xrouter_compiler/build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'java-library'
33
ext {
44
PUBLISH_GROUP_ID = "io.github.wangshuwen1107"
55
PUBLISH_ARTIFACT_ID = 'xrouter-compiler'
6-
PUBLISH_VERSION = '1.0.4'
6+
PUBLISH_VERSION = "$sdkVersion"
77
}
88
apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"
99

@@ -13,8 +13,11 @@ java {
1313
}
1414

1515
dependencies {
16-
implementation project(":xrouter_annotation")
17-
// implementation 'io.github.wangshuwen1107:xrouter-annotation:1.0.4'
16+
if(debug == "true"){
17+
implementation project(":xrouter_annotation")
18+
}else {
19+
implementation "io.github.wangshuwen1107:xrouter-annotation:$sdkVersion"
20+
}
1821
compileOnly 'com.google.auto.service:auto-service-annotations:1.0-rc7'
1922
implementation 'com.squareup:javapoet:1.10.0'
2023
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc7'

xrouter_core/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
33
ext {
44
PUBLISH_GROUP_ID = "io.github.wangshuwen1107"
55
PUBLISH_ARTIFACT_ID = 'xrouter-core'
6-
PUBLISH_VERSION = '1.0.4'
6+
PUBLISH_VERSION = "$sdkVersion"
77
}
88
apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"
99

@@ -38,7 +38,11 @@ android {
3838
dependencies {
3939
api 'com.alibaba:fastjson:1.2.23'
4040
api project(":xrouter_annotation")
41-
// api 'io.github.wangshuwen1107:xrouter-annotation:1.0.4'
41+
if(debug == "true"){
42+
api project(":xrouter_annotation")
43+
}else {
44+
api "io.github.wangshuwen1107:xrouter-annotation:$sdkVersion"
45+
}
4246
}
4347

4448

0 commit comments

Comments
 (0)