11apply plugin : ' com.android.library'
2- apply plugin : ' digital.wup.android- maven-publish'
2+ apply plugin : ' maven-publish'
33apply plugin : ' org.jetbrains.dokka-android'
44
55dependencies {
6- implementation ' androidx.lifecycle:lifecycle-runtime:2.0 .0'
6+ implementation ' androidx.lifecycle:lifecycle-runtime:2.2 .0'
77
8- compileOnly ' androidx.annotation:annotation:1.0 .0'
8+ compileOnly ' androidx.annotation:annotation:1.1 .0'
99
1010 api ' com.google.auto.value:auto-value-annotations:1.6.2'
1111 annotationProcessor ' com.google.auto.value:auto-value:1.6.2'
@@ -35,51 +35,54 @@ android {
3535 }
3636}
3737
38- publishing {
39- publications {
40- mavenAar( MavenPublication ) {
41- groupId = ' de.cotech '
42- artifactId = ' hwsecurity '
43- version = android . defaultConfig . versionName
38+ // https://developer.android.com/studio/build/maven-publish-plugin
39+ afterEvaluate {
40+ publishing {
41+ publications {
42+ release( MavenPublication ) {
43+ from components . release
4444
45- from components. android
45+ groupId = ' de.cotech'
46+ artifactId = ' hwsecurity'
47+ version = android. defaultConfig. versionName
4648
47- pom {
48- url = ' https://hwsecurity.dev'
49- licenses {
50- license {
51- name = ' Commercial'
52- url = ' https://hwsecurity.dev/sales/'
53- distribution = ' repo'
49+ pom {
50+ url = ' https://hwsecurity.dev'
51+ licenses {
52+ license {
53+ name = ' Commercial'
54+ url = ' https://hwsecurity.dev/sales/'
55+ distribution = ' repo'
56+ }
57+ license {
58+ name = ' GNU General Public License, version 3'
59+ url = ' https://www.gnu.org/licenses/gpl-3.0.txt'
60+ }
5461 }
55- license {
56- name = ' GNU General Public License, version 3 '
57- url = ' https://www.gnu.org/licenses/gpl-3.0.txt '
62+ organization {
63+ name = ' Confidential Technologies GmbH '
64+ url = ' https://www.cotech.de '
5865 }
5966 }
60- organization {
61- name = ' Confidential Technologies GmbH'
62- url = ' https://www.cotech.de'
63- }
6467 }
6568 }
66- }
67- /*
68- * To upload release, create file gradle.properties in ~/.gradle/ with this content:
69- *
70- * cotechMavenName=xxx
71- * cotechMavenPassword=xxx
72- */
73- if (project. hasProperty(' cotechMavenName' ) && project. hasProperty(' cotechMavenPassword' )) {
74- println " Found cotechMavenName, cotechMavenPassword in gradle.properties!"
69+ /*
70+ * To upload release, create file gradle.properties in ~/.gradle/ with this content:
71+ *
72+ * cotechMavenName=xxx
73+ * cotechMavenPassword=xxx
74+ */
75+ if (project. hasProperty(' cotechMavenName' ) && project. hasProperty(' cotechMavenPassword' )) {
76+ println " Found cotechMavenName, cotechMavenPassword in gradle.properties!"
7577
76- repositories {
77- maven {
78- credentials {
79- username cotechMavenName
80- password cotechMavenPassword
78+ repositories {
79+ maven {
80+ credentials {
81+ username cotechMavenName
82+ password cotechMavenPassword
83+ }
84+ url = " https://maven.cotech.de"
8185 }
82- url = " https://maven.cotech.de"
8386 }
8487 }
8588 }
@@ -90,8 +93,9 @@ dokka {
9093 dokkaFatJar = files(' libs/dokka-hugo-fatjar-0.9.17.jar' )
9194 // does not work correctly with Maven:
9295 // dokkaFatJar = 'de.cotech:dokka-hugo-fatjar:0.9.17'
96+ moduleName = ' hwsecurity'
9397 outputFormat = " hugo"
94- outputDirectory = " $b uildDir /dokka /reference"
98+ outputDirectory = " $p rojectDir /../../hwsecurity.dev/content /reference"
9599 sourceDirs = files(' src/main/java' )
96100
97101 packageOptions {
0 commit comments