Skip to content

Commit 8f44cd0

Browse files
committed
添加release配置
1 parent 5c140d1 commit 8f44cd0

File tree

8 files changed

+70
-8
lines changed

8 files changed

+70
-8
lines changed

maven_gradle.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ publishing {
6565
}
6666
}
6767

68-
signing {
69-
sign publishing.publications.release
70-
}
68+
//signing {
69+
// sign publishing.publications.release
70+
//}
7171

7272

7373
javadoc {

maven_publish.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ afterEvaluate {
7979
}
8080
}
8181

82-
signing {
83-
sign publishing.publications.release
84-
}
82+
// signing {
83+
// sign publishing.publications.release
84+
// }
8585
// javadoc {
8686

8787
// }

plugin_config.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ project.ext {
4646
RP_GIT_URL = 'https://github.com/Qihoo360/RePlugin'
4747
RP_LICENSES_URL = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
4848
RP_LICENSES_NAME = 'Apache-2.0'
49+
keystore = rootDir.path + '/replugin.keystore'
4950

5051
}

replugin.keystore

2.53 KB
Binary file not shown.

sample/sample-host/build.gradle

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,41 @@ android {
3030
kotlinOptions {
3131
jvmTarget = '1.8'
3232
}
33+
34+
signingConfigs {
35+
debug {
36+
storeFile file(rootProject.ext.keystore)
37+
keyAlias "replugin"
38+
keyPassword "replugin"
39+
storePassword "replugin"
40+
}
41+
release {
42+
storeFile file(rootProject.ext.keystore)
43+
keyAlias "replugin"
44+
keyPassword "replugin"
45+
storePassword "replugin"
46+
}
47+
}
48+
buildTypes {
49+
release {
50+
minifyEnabled true
51+
shrinkResources true
52+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
53+
signingConfig signingConfigs.release
54+
}
55+
debug {
56+
minifyEnabled true
57+
shrinkResources true
58+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
59+
signingConfig signingConfigs.debug
60+
}
61+
}
3362
}
3463

3564
apply plugin: 'replugin-host-gradle'
3665

3766
repluginHostConfig {
38-
useAppCompat = false
67+
useAppCompat = true
3968
}
4069

4170
dependencies {

sample/sample-host/proguard-rules.pro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile
22+
#-keep class com.qihoo360.replugin.**{*;}
23+
#-keep class com.qihoo360.loader2.**{*;}
24+
# 必须配置的,否则useappCompact=true使用有问题
25+
-keep class androidx.appcompat.R$style{*;}
Binary file not shown.

sample/sample-plugin/build.gradle

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,34 @@ android {
3030
kotlinOptions {
3131
jvmTarget = '1.8'
3232
}
33+
34+
signingConfigs {
35+
debug {
36+
storeFile file(rootProject.ext.keystore)
37+
keyAlias "replugin"
38+
keyPassword "replugin"
39+
storePassword "replugin"
40+
}
41+
release {
42+
storeFile file(rootProject.ext.keystore)
43+
keyAlias "replugin"
44+
keyPassword "replugin"
45+
storePassword "replugin"
46+
}
47+
}
48+
buildTypes {
49+
release {
50+
minifyEnabled true
51+
shrinkResources true
52+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
53+
signingConfig signingConfigs.release
54+
}
55+
debug {
56+
minifyEnabled false
57+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
58+
signingConfig signingConfigs.debug
59+
}
60+
}
3361
}
3462

3563
apply plugin: 'replugin-plugin-gradle'

0 commit comments

Comments
 (0)