@@ -4,6 +4,9 @@ plugins {
44 id ' maven-publish'
55}
66
7+ group = ' io.syslogic'
8+ version = libs. versions. app. version. name. get()
9+
710base {
811 String versionName = libs. versions. app. version. name. get()
912 archivesName = " androidx_github_$versionName "
@@ -28,8 +31,8 @@ android {
2831 }
2932
3033 compileOptions {
31- sourceCompatibility JavaVersion . VERSION_17
32- targetCompatibility JavaVersion . VERSION_17
34+ sourceCompatibility = JavaVersion . VERSION_17
35+ targetCompatibility = JavaVersion . VERSION_17
3336 }
3437
3538 buildFeatures {
@@ -67,31 +70,31 @@ android {
6770dependencies {
6871
6972 // Material Design Components
70- implementation libs. material. design
73+ implementation( libs. material. design)
7174
7275 // Annotations
73- implementation libs. androidx. annotation
76+ implementation( libs. androidx. annotation)
7477
7578 // App Compat
76- implementation libs. androidx. appcompat
79+ implementation( libs. androidx. appcompat)
7780
7881 // Data-Binding Runtime
79- implementation libs. androidx. databinding
82+ implementation( libs. androidx. databinding)
8083
8184 // Room Runtime
82- annotationProcessor libs. androidx. room. compiler
83- testImplementation libs. androidx. room. testing
84- implementation libs. androidx. room. runtime
85+ annotationProcessor( libs. androidx. room. compiler)
86+ testImplementation( libs. androidx. room. testing)
87+ implementation( libs. androidx. room. runtime)
8588
8689 // Retrofit2
87- implementation libs. gson
88- implementation libs. retrofit
89- implementation (libs. retrofit. gson. converter) {
90- exclude group : " com.google.code.gson" , module : " gson"
90+ implementation( libs. gson)
91+ implementation( libs. retrofit)
92+ implementation(libs. retrofit. gson. converter) {
93+ exclude( group : " com.google.code.gson" , module : " gson" )
9194 }
9295
93- testImplementation libs. junit
94- androidTestImplementation libs. androidx. test. junit
96+ testImplementation( libs. junit)
97+ androidTestImplementation( libs. androidx. test. junit)
9598}
9699
97100tasks. register(' javadoc' , Javadoc ) {
@@ -105,7 +108,7 @@ tasks.register('javadoc', Javadoc) {
105108 android. getBootClasspath(). forEach{ classpath + = fileTree(it) }
106109 classpath + = fileTree(dir : project. file(" build/tmp/aarsToJars/" ). absolutePath)
107110 classpath + = configurations. implementation
108- exclude " **/BuildConfig.java" , " **/R.java" , " **/*.kt"
111+ exclude( " **/BuildConfig.java" , " **/R.java" , " **/*.kt" )
109112 failOnError = false
110113
111114 // options.verbose()
@@ -116,6 +119,10 @@ tasks.register('javadoc', Javadoc) {
116119 options. linkSource true
117120 options. author true
118121
122+ onlyIf {
123+ project. file(" build/intermediates/aar_main_jar" ). exists()
124+ }
125+
119126 doFirst {
120127
121128 // extract AAR files
@@ -141,33 +148,26 @@ tasks.register('javadoc', Javadoc) {
141148 }
142149 doLast {
143150 // delete temporary directory.
144- delete project. fileTree(' build/tmp7aarsToJars ' )
151+ delete project. fileTree(" build/tmp/aarsToJars " )
145152 }
146153}
147154
148- javadoc. onlyIf {
149- project. file(" build/intermediates/aar_main_jar" ). exists()
150- }
151-
152- tasks. register(' javadocJar' , Jar ) {
153- dependsOn javadoc
154- archiveClassifier. set(' javadoc' )
155- from javadoc. destinationDir
155+ tasks. register(" javadocJar" , Jar ) {
156+ dependsOn(javadoc)
157+ archiveClassifier. set(" javadoc" )
158+ from(javadoc. destinationDir)
156159}
157160
158161tasks. register(' sourcesJar' , Jar ) {
159- from android. sourceSets. main. java. srcDirs
162+ from( android. sourceSets. main. java. srcDirs)
160163 archiveClassifier. set(' sources' )
161164}
162165
163166artifacts {
164- archives javadocJar
165- archives sourcesJar
167+ archives( javadocJar)
168+ archives( sourcesJar)
166169}
167170
168- group = ' io.syslogic'
169- version = libs. versions. app. version. name. get()
170-
171171afterEvaluate {
172172 publishing {
173173 publications {
0 commit comments