File tree 3 files changed +10
-20
lines changed
3 files changed +10
-20
lines changed Original file line number Diff line number Diff line change 11
11
with :
12
12
distribution : ' zulu'
13
13
java-version : 17
14
- - name : CopyAars
15
- uses : eskatos/gradle-command-action@v1
16
- with :
17
- arguments : copyAars
18
14
- name : Build
19
15
uses : eskatos/gradle-command-action@v1
20
16
with :
Original file line number Diff line number Diff line change @@ -142,9 +142,7 @@ FirebaseDatabase.getInstance().setPersistenceEnabled(false)
142
142
143
143
This library is built with Gradle.
144
144
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.
148
146
149
147
### Implementation details
150
148
Original file line number Diff line number Diff line change @@ -41,20 +41,16 @@ val copyAars by tasks.registering(Copy::class) {
41
41
into(" build/aar" )
42
42
}
43
43
44
- val extractClasses by tasks.creating {
44
+ val extractClasses by tasks.registering( Copy :: class ) {
45
45
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
- rename(" classes.jar" , aarFile.nameWithoutExtension + " .jar" )
55
- into(" build/jar" )
56
- }
57
- )
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
+ }
58
54
}
59
55
}
60
56
You can’t perform that action at this time.
0 commit comments