File tree 1 file changed +7
-5
lines changed
processing/buildSrc/src/main/groovy
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,8 @@ class ImportAar implements Plugin<Project> {
186
186
class ExtractAarJarsTask extends org.gradle.api. DefaultTask {
187
187
@TaskAction
188
188
void extractJars () {
189
- File outputDir = new File (project. buildDir, ' libs' )
189
+ // File outputDir = new File(project.buildDir, 'libs')
190
+ File outputDir = new File (System . getProperty(" user.dir" ), " build/libs" )
190
191
outputDir. mkdirs()
191
192
192
193
// Configuration compileClasspath = project.configurations.getByName('implementation')
@@ -202,10 +203,11 @@ class ExtractAarJarsTask extends org.gradle.api.DefaultTask {
202
203
ZipFile zipFile = new ZipFile (aarFile)
203
204
zipFile. entries(). each { entry ->
204
205
if (entry. name. endsWith(' .jar' )) {
205
- println " Classes JAR found: ${ entry} "
206
- String aarName = aarFile. name. replace(" .aar" , " " )
207
-
208
- File jarOutput = new File (outputDir, " ${ aarName} .jar" )
206
+ println " Classes JAR found: ${ entry} "
207
+ String aarName = aarFile. name. replace(" .aar" , " " )
208
+ String jarName = " ${ aarName} .jar" . replaceFirst(/ -\d +(\.\d +)*(?=\. jar$)/ , ' ' )
209
+
210
+ File jarOutput = new File (outputDir, jarName)
209
211
jarOutput. parentFile. mkdirs()
210
212
211
213
// Write the JAR file to the output directory
You can’t perform that action at this time.
0 commit comments