File tree Expand file tree Collapse file tree 3 files changed +10
-21
lines changed Expand file tree Collapse file tree 3 files changed +10
-21
lines changed Original file line number Diff line number Diff line change 1111 with :
1212 distribution : ' zulu'
1313 java-version : 17
14- - name : CopyAars
15- uses : eskatos/gradle-command-action@v1
16- with :
17- arguments : copyAars
1814 - name : Build
1915 uses : eskatos/gradle-command-action@v1
2016 with :
Original file line number Diff line number Diff line change @@ -142,9 +142,7 @@ FirebaseDatabase.getInstance().setPersistenceEnabled(false)
142142
143143This library is built with Gradle.
144144
145- Run ` ./gradlew build ` to build, the first time you run build it will fail as it requires the output of the custom ` copyAars ` and ` extractClasses `
146- gradle tasks to be present in the build folder before the project will successfully compile. These tasks extract the jar files from the
147- Firebase Android library AAR files to the ` build/jar ` folder and run on ` ./gradlew build ` .
145+ Run ` ./gradlew build ` to build the library locally.
148146
149147### Implementation details
150148
Original file line number Diff line number Diff line change @@ -41,21 +41,16 @@ val copyAars by tasks.registering(Copy::class) {
4141 into(" build/aar" )
4242}
4343
44- val extractClasses by tasks.creating {
44+ val extractClasses by tasks.registering( Copy :: class ) {
4545 dependsOn(copyAars)
46- val aarFileTree = fileTree(" build/aar" )
47-
48- aarFileTree.forEach { aarFile: File ->
49-
50- dependsOn(
51- tasks.create(aarFile.name, Copy ::class ) {
52- from(zipTree(aarFile))
53- include(" classes.jar" )
54- fileMode = 0b01110110000
55- rename(" classes.jar" , aarFile.nameWithoutExtension + " .jar" )
56- into(" build/jar" )
57- }
58- )
46+ configurations[" aar" ].forEach { aarFile ->
47+ copy {
48+ from(zipTree(aarFile))
49+ include(" classes.jar" )
50+ fileMode = 0b01110110000
51+ rename(" classes.jar" , aarFile.nameWithoutExtension + " .jar" )
52+ into(" build/jar" )
53+ }
5954 }
6055}
6156
You can’t perform that action at this time.
0 commit comments