@@ -17,6 +17,8 @@ android {
17
17
targetSdk target_sdk
18
18
minSdk min_sdk
19
19
}
20
+
21
+ sourceSets. main. java. srcDirs = [ " src/main/java" ]
20
22
21
23
compileOptions {
22
24
sourceCompatibility JavaVersion . VERSION_17
@@ -100,14 +102,15 @@ tasks.register('javadoc', Javadoc) {
100
102
source = android. sourceSets. main. java. srcDirs
101
103
destinationDir = file(" ${ project.buildDir} /outputs/javadoc/" )
102
104
configurations. implementation. setCanBeResolved(true )
105
+
103
106
classpath = files(new File (" ${ android.sdkDirectory} /platforms/${ android.compileSdkVersion} /android.jar" ))
104
- classpath + = project . files( android. getBootClasspath(). join( File . pathSeparator))
107
+ android. getBootClasspath(). forEach{classpath + = fileTree(it) }
105
108
classpath + = fileTree(dir : " $buildDir /tmp/aarsToJars/" )
106
109
classpath + = configurations. implementation
107
- exclude " **/BuildConfig.java" , " **/R.java"
110
+ exclude " **/BuildConfig.java" , " **/R.java" , " **/*.kt "
108
111
failOnError false
109
112
110
- // options.verbose()
113
+ options. verbose()
111
114
// javadoc: warning - The code being documented uses modules but the packages
112
115
// defined in https://developer.android.com/reference/ are in the unnamed module.
113
116
options. links " https://docs.oracle.com/en/java/javase/17/docs/api/"
@@ -118,13 +121,15 @@ tasks.register('javadoc', Javadoc) {
118
121
doFirst {
119
122
120
123
// extract AAR files
121
- configurations. implementation. filter { it. name. endsWith(' .aar' ) }. each { aar ->
122
- copy {
123
- from zipTree(aar)
124
- include " **/classes.jar"
125
- into " $buildDir /tmp/aarsToJars/${ aar.name.replace('.aar', '')} /"
126
- }
127
- }
124
+ configurations. implementation
125
+ .filter { it. name. endsWith(' .aar' ) }
126
+ .each { aar ->
127
+ copy {
128
+ from zipTree(aar)
129
+ include " **/classes.jar"
130
+ into " $buildDir /tmp/aarsToJars/${ aar.name.replace('.aar', '')} /"
131
+ }
132
+ }
128
133
129
134
// provide JAR, which contains the generated data-binding classes
130
135
def aar_main = new File (" $buildDir /intermediates/aar_main_jar" )
0 commit comments