project.android.applicationVariants.all { ApplicationVariant variant ->
if (!isReleaseBuildType(variant)) {
return
}
variant.outputs.each { ApkVariantOutput output ->
project.getLogger().info "Remote signing enabled for build variant: $project.name $variant.name"
// create a signing task for this
project.tasks.create(
"remoteSign${output.name.capitalize()}Apk", RemoteSignApkTask,
new RemoteSignApkTask.ConfigAction(variant, output)
)
}
variant.testVariant?.outputs?.each { ApkVariantOutput output ->
project.getLogger().info "Remote signing enabled for build test variant: $project.name $variant.testVariant.name"
// create a signing task for this
project.tasks.create(
"remoteSign${output.name.capitalize()}Apk", RemoteSignApkTask,
new RemoteSignApkTask.ConfigAction(variant, output)
)
}
}
But it starting to be obsolete, it should be rewritten to more lazy way. So I'm asking if there is any better way already.
--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
signTask.dependsOn output.packageApplication
output.assemble.dependsOn signTask
As you can se here. And probably still need to call variant.outputsAreSigned = true.
--
variant.assembleProvider.configure {
dependsOn(signTask)
}
for dependencies, you only need the second line as the dependency on the packageApplication is embedded in the FileCollection so your task is implicitly made dependent (as long as you declare the FileCollection as an Input of course).
variant.assembleProvider?.configure {
dependsOn(signTask)
}
variant.getVariantData().getTaskContainer().bundleTask?.configure {
it.dependsOn(bundleSignTask)
}
println "Single file: " + artifact.get().getSingleFile()
variant.getFinalArtifact(InternalArtifactType.APK_FOR_LOCAL_TEST)
but it is always empty. Only way hot to get it is still variant.testVariant?.outputs?. Or miss I something?
File assembleOutputFile = output.outputFile
signTask.outputFile = new File(assembleOutputFile.parent, assembleOutputFile.name.replaceFirst("[,-]unsigned", ""))
signTask.inputFile = signTask.outputFile
// hack to keep proper final name also when assemble task will be skipped
output.outputFileName = signTask.outputFile.getName()
xxxxx
@TaskAction
void sign() {
println '>>>>>>>>>>>>>> A2 sign task: ' + inputFiles.get().files.size()
variant.assembleProvider.configure {
dependsOn(signTask)
}
--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/55e89d8f-5216-4ff5-b2e0-765f80025438%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to adt...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/cae178f3-d127-4803-9062-8bacbeebd250%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/cae178f3-d127-4803-9062-8bacbeebd250%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/76a13511-fa1b-4737-9c20-8f5425867438%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/76a13511-fa1b-4737-9c20-8f5425867438%40googlegroups.com.
it's not possible to do this in 3.6. We are hoping to deliver most of this during the 4.1 and 4.2 releases.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/76a13511-fa1b-4737-9c20-8f5425867438%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/4aecddaa-33a0-4282-aede-5d076a259176o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/0d56caca-91f4-40d7-8069-055051881948n%40googlegroups.com.
val transformationRequest = artifacts.use(singingTaskProvider)
.wiredWithDirectories(
SigningTask::inputApkFolder,
SingingTas::outputAPKFolder)
.toTransformMany(ArtifactType.APK)
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/2bb989c1-97d1-4d7c-9603-53eaf0ce66dcn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/1d22642d-3d74-456e-af8b-8e17eda0d055n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adt-dev/4113877e-5987-4d9c-bc5e-d008fdc14e6fn%40googlegroups.com.