File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ buildscript {
88 }
99 dependencies {
1010 classpath ' com.android.tools.build:gradle:9.2.1'
11- classpath ' com.github.dcendents:android-maven-gradle-plugin:2.1'
1211 classpath ' io.github.gradle-nexus:publish-plugin:2.0.0'
1312 }
1413}
Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
2+ apply plugin : ' maven-publish'
23
34ext {
45 PUBLISH_GROUP_ID = ' io.github.tutorialsandroid'
5- PUBLISH_VERSION = ' 20.5.11 '
6+ PUBLISH_VERSION = ' 20.5.12 '
67 PUBLISH_ARTIFACT_ID = ' kalertdialog'
78 PUBLISH_DESCRIPTION = ' AlertDialog for Android, a beautiful and material alert dialog to use in your android app.'
89 PUBLISH_URL = ' https://github.com/tutorialsandroid/KAlertDialog'
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ android {
88 applicationId " com.developer.kalert.alert"
99 minSdkVersion 23
1010 targetSdkVersion 37
11- versionCode 40
12- versionName " 20.5.11 "
11+ versionCode 41
12+ versionName " 20.5.12 "
1313 }
1414
1515 compileOptions {
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ apply plugin: 'signing'
44group = PUBLISH_GROUP_ID
55version = PUBLISH_VERSION
66
7+ def isJitPack = System . getenv(" JITPACK" ) == " true"
8+
79afterEvaluate {
810 publishing {
911 publications {
@@ -46,17 +48,27 @@ afterEvaluate {
4648 }
4749 }
4850
51+ def hasSigningKeys =
52+ project. hasProperty(" signing.keyId" ) &&
53+ project. hasProperty(" signing.password" ) &&
54+ project. hasProperty(" signing.secretKeyRingFile" ) &&
55+ project. property(" signing.keyId" ) &&
56+ project. property(" signing.password" ) &&
57+ project. property(" signing.secretKeyRingFile" )
58+
4959 signing {
5060 required {
51- gradle . taskGraph . allTasks . any { task ->
52- task . name . toLowerCase() . contains( " publish " )
53- }
61+ ! isJitPack &&
62+ hasSigningKeys &&
63+ ! version . toString() . endsWith( " SNAPSHOT " )
5464 }
5565
5666 sign publishing. publications. release
5767 }
58- }
59- ext[" signing.keyId" ] = rootProject. ext[" signing.keyId" ]
60- ext[" signing.password" ] = rootProject. ext[" signing.password" ]
61- ext[" signing.secretKeyRingFile" ] = rootProject. ext[" signing.secretKeyRingFile" ]
6268
69+ tasks. withType(Sign ). configureEach {
70+ onlyIf {
71+ ! isJitPack && hasSigningKeys
72+ }
73+ }
74+ }
You can’t perform that action at this time.
0 commit comments