Skip to content

Commit

Permalink
fix AarToJarTransform
Browse files Browse the repository at this point in the history
  • Loading branch information
0xffrom committed Apr 19, 2023
1 parent 8c6a9dd commit 58e0673
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/andryuh/aar2jar/Aar2Jar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ fun SourceSetContainer.withName(name: String, f: SourceSet.() -> Unit) {

abstract class AarToJarTransform : TransformAction<TransformParameters.None> {

@PathSensitive(PathSensitivity.RELATIVE)
@InputArtifact
abstract fun aarProvider(): Provider<FileSystemLocation>
@get:PathSensitive(PathSensitivity.RELATIVE)
@get:InputArtifact
abstract val inputFile: Provider<FileSystemLocation>

override fun transform(outputs: TransformOutputs) {
val input = aarProvider().get().asFile
val input = inputFile.get().asFile
val outputFile = outputs.file(input.name.replace(".aar", ".jar"))

ZipFile(input).use { zipFile ->
Expand Down

0 comments on commit 58e0673

Please sign in to comment.