Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ captures/
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
.idea/jarRepositories.xml

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ compileGroovy {
dependencies {
compileOnly gradleApi()
compileOnly localGroovy()
compileOnly 'com.android.tools.build:gradle:3.6.2'
compileOnly 'com.android.tools.build:gradle:4.0.0'
}

publishing {
Expand Down
2 changes: 1 addition & 1 deletion download-sentry-cli.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
cd $(dirname "$0")
REPO=getsentry/sentry-cli
VERSION=1.52.1
VERSION=1.54.0
PLATFORMS="Darwin-x86_64 Linux-i686 Linux-x86_64 Windows-i686"

rm -f src/main/resources/bin/sentry-cli-*
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ version = 1.7.35-SNAPSHOT

# disable daemon mode, required by uploadArchives
org.gradle.daemon=false

# for debugging
# org.gradle.logging.level=info
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Apr 10 10:46:21 CEST 2020
#Wed Jun 10 14:11:32 CEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
29 changes: 20 additions & 9 deletions src/main/groovy/io/sentry/android/gradle/SentryPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -219,20 +219,20 @@ class SentryPlugin implements Plugin<Project> {

project.android.applicationVariants.all { ApplicationVariant variant ->
variant.outputs.each { variantOutput ->
def manifestPath = extension.manifestPath
if (manifestPath == null) {
def manifestFile = null
if (extension.manifestPath == null) {
def dir = findAndroidManifestFileDir(project, variantOutput)
if (dir != null) {
project.logger.info("manifestDir: ${dir.path}")
} else {
project.logger.info("manifestDir is null")
}

manifestPath = new File(new File(dir, variantOutput.dirName), "AndroidManifest.xml")
project.logger.info("manifestPath: ${manifestPath}")
manifestFile = new File(new File(dir, variantOutput.dirName), "AndroidManifest.xml")
} else {
project.logger.info("manifestPath: ${manifestPath}")
manifestFile = new File(extension.manifestPath)
}
project.logger.info("manifestFile: ${manifestFile.absolutePath}")

def mappingFile = getMappingFile(variant, project)
def transformerTask = getTransformerTask(project, variant)
Expand Down Expand Up @@ -303,7 +303,7 @@ class SentryPlugin implements Plugin<Project> {
cli,
"upload-proguard",
"--android-manifest",
manifestPath,
manifestFile,
"--write-properties",
debugMetaPropPath,
mappingFile
Expand Down Expand Up @@ -336,6 +336,17 @@ class SentryPlugin implements Plugin<Project> {
enabled true
}

// when running AS v4.x and split ABIs is enabled, AS generates
// only the files related to your device/emulator, and this breaks the plugin,
// so in case that the files don't exist for this variant, we skip it.
persistIdsTask.onlyIf {
def exist = manifestFile.exists()
if (!exist) {
project.logger.info("${manifestFile.absolutePath} doesn't exist, ${variant.name} won't upload-proguard files")
}
return exist
}

// create and hooks the uploading of native symbols task after the assembling task
def variantOutputName = "${variant.name.capitalize()}${variantOutput.name.capitalize()}"
def uploadNativeSymbolsTaskName = "uploadNativeSymbolsFor${variantOutputName}"
Expand Down Expand Up @@ -414,7 +425,7 @@ class SentryPlugin implements Plugin<Project> {
if (packageTask != null) {
project.logger.info("packageTask ${packageTask.path}")
} else {
packageTask.logger.info("packageTask is null")
project.logger.info("packageTask is null")
}

// the package task will only be executed if the persistIdsTask has already been executed.
Expand All @@ -427,7 +438,7 @@ class SentryPlugin implements Plugin<Project> {
if (assembleTask != null) {
project.logger.info("assembleTask ${assembleTask.path}")
} else {
assembleTask.logger.info("assembleTask is null")
project.logger.info("assembleTask is null")
}

// uploadNativeSymbolsTask only will be executed after the assemble task
Expand All @@ -441,7 +452,7 @@ class SentryPlugin implements Plugin<Project> {
bundleTask.finalizedBy uploadNativeSymbolsTask
}
} else {
assembleTask.logger.info("uploadNativeSymbolsTask won't be executed")
project.logger.info("uploadNativeSymbolsTask won't be executed")
}
}
}
Expand Down