com.bugsnag.android.gradle.BugsnagNdkSetupTask.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bugsnag-android-gradle-plugin Show documentation
Show all versions of bugsnag-android-gradle-plugin Show documentation
Gradle plugin to automatically upload ProGuard mapping files to Bugsnag.
package com.bugsnag.android.gradle
import org.gradle.api.DefaultTask
import org.gradle.api.artifacts.ResolvedArtifact
import org.gradle.api.tasks.TaskAction
class BugsnagNdkSetupTask extends DefaultTask {
BugsnagNdkSetupTask() {
super()
this.description = "Copies shared object files from the bugsnag-android AAR to the required build directory"
}
@TaskAction
void setupNdkProject() {
project.configurations.findAll {
it.toString().contains('CompileClasspath')
}.each { config ->
ResolvedArtifact artifact = config.resolvedConfiguration.resolvedArtifacts.find {
String identifier = it.id.componentIdentifier.toString()
identifier.contains("bugsnag-android") && it.file != null
}
if (artifact) {
File artifactFile = artifact.file
File buildDir = project.buildDir
File dst = new File(buildDir, "/intermediates/bugsnag-libs")
project.copy {
from project.zipTree(artifactFile)
into(project.file(dst))
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy