Skip to content

Commit

Permalink
Merge pull request #1 from madisp/master
Browse files Browse the repository at this point in the history
Fix transform output content types and scopes
  • Loading branch information
Xizhi Xu committed Apr 7, 2016
2 parents 6713134 + f3dba0e commit f29b188
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ public class AspectJTransform extends Transform {
for (TransformInput input : inputs) {
input.directoryInputs.each {
String outputFileName = it.name + '-' + it.file.path.hashCode()
output = outputProvider.getContentLocation(outputFileName, outputTypes, scopes, Format.DIRECTORY)
output = outputProvider.getContentLocation(outputFileName, it.contentTypes, it.scopes, Format.DIRECTORY)
FileUtils.copyDirectory(it.file, output)
}

input.jarInputs.each {
String outputFileName = it.name.replace(".jar", "") + '-' + it.file.path.hashCode()
output = outputProvider.getContentLocation(outputFileName, outputTypes, scopes, Format.JAR)
output = outputProvider.getContentLocation(outputFileName, it.contentTypes, it.scopes, Format.JAR)
FileUtils.copyFile(it.file, output)
}
}
Expand Down Expand Up @@ -126,7 +126,7 @@ public class AspectJTransform extends Transform {
nothingExcluded = false
classpathFiles.add(folder.file)
String outputFileName = folder.name + '-' + folder.file.path.hashCode()
output = outputProvider.getContentLocation(outputFileName, outputTypes, scopes, Format.DIRECTORY)
output = outputProvider.getContentLocation(outputFileName, folder.contentTypes, folder.scopes, Format.DIRECTORY)
FileUtils.copyDirectory(folder.file, output)
} else {
files.add(folder.file)
Expand All @@ -139,7 +139,7 @@ public class AspectJTransform extends Transform {
nothingExcluded = false
classpathFiles.add(jar.file)
String outputFileName = jar.name.replace(".jar", "") + '-' + jar.file.path.hashCode()
output = outputProvider.getContentLocation(outputFileName, outputTypes, scopes, Format.JAR)
output = outputProvider.getContentLocation(outputFileName, jar.contentTypes, jar.scopes, Format.JAR)
FileUtils.copyFile(jar.file, output)
} else {
files.add(jar.file)
Expand All @@ -157,7 +157,7 @@ public class AspectJTransform extends Transform {
[*classpathFiles.collect { it.absolutePath }, javaRtPath] :
classpathFiles.collect { it.absolutePath })
final String bootpath = Joiner.on(File.pathSeparator).join(project.android.bootClasspath)
output = outputProvider.getContentLocation("main", outputTypes, scopes, Format.DIRECTORY);
output = outputProvider.getContentLocation("main", outputTypes, Sets.immutableEnumSet(QualifiedContent.Scope.PROJECT), Format.DIRECTORY);

// assemble compile options
logger.quiet "Weaving ..."
Expand Down Expand Up @@ -243,4 +243,4 @@ public class AspectJTransform extends Transform {
return false
}

}
}

0 comments on commit f29b188

Please sign in to comment.