Commit b29699c2 authored by Matyáš Latner's avatar Matyáš Latner

#653 Use production sentry DSN only for master branch builds

parent fd0a401a
......@@ -49,21 +49,21 @@ android {
applicationIdSuffix rootProject.applicationIdBranch + rootProject.applicationIdDebugSuffix
buildConfigField ASSETS_CHECKSUM_FIELD_TYPE, ASSETS_CHECKSUM_FIELD_NAME, rootProject.ext.assetsChecksumPattern
resValue "string", "app_name", "${tablexiaAppName}"
resValue "string", "sentry_dsn", project.hasProperty('TABLEXIA_SENTRY_DSN_DEBUG') ? "$TABLEXIA_SENTRY_DSN_DEBUG" : "$project.sentryDSNFallbackValue";
resValue "string", "sentry_dsn", project.sentryDSN
}
release {
debuggable false
applicationIdSuffix rootProject.applicationIdBranch
buildConfigField ASSETS_CHECKSUM_FIELD_TYPE, ASSETS_CHECKSUM_FIELD_NAME, rootProject.ext.assetsChecksumPattern
resValue "string", "app_name", "${tablexiaAppName}"
resValue "string", "sentry_dsn", project.hasProperty('TABLEXIA_SENTRY_DSN_RELEASE') ? "$TABLEXIA_SENTRY_DSN_RELEASE" : "$project.sentryDSNFallbackValue";
resValue "string", "sentry_dsn", project.sentryDSN
}
devel.initWith(buildTypes.debug)
devel {
applicationIdSuffix rootProject.applicationIdDevelSuffix
buildConfigField ASSETS_CHECKSUM_FIELD_TYPE, ASSETS_CHECKSUM_FIELD_NAME, rootProject.ext.assetsChecksumPattern
resValue "string", "app_name", "${tablexiaAppName}"
resValue "string", "sentry_dsn", "$project.sentryDSNFallbackValue";
resValue "string", "sentry_dsn", project.sentryDSNFallbackValue
}
}
......
......@@ -82,6 +82,7 @@ allprojects {
//Fallback value if sentry DSN is not defined (gradle parameter SENTRY_DSN_DEBUG or SENTRY_DSN_RELEASE)
sentryDSNFallbackValue = "None"
sentryDSN = onMaster() ? getPropertyValueOrFallbackValue("TABLEXIA_SENTRY_DSN_RELEASE", sentryDSNFallbackValue) : getPropertyValueOrFallbackValue("TABLEXIA_SENTRY_DSN_DEBUG", sentryDSNFallbackValue)
gdxVersion = '1.9.2'
gdxUtilsVersion = '0.13.2'
......
......@@ -17,7 +17,7 @@
apply plugin: "java"
sourceCompatibility = 1.6
sourceCompatibility = 1.8
sourceSets.main.java.srcDirs = [ "src/" ]
project.ext.mainClassName = "cz.nic.tablexia.desktop.DesktopLauncher"
......@@ -44,7 +44,7 @@ task debugJar(type: Jar) {
attributes 'Build-Type': 'debug'
attributes 'Version-Name': tablexiaVersionName
attributes 'Assets-Cheksums': getMapConvertedToString(rootProject.ext.assetsChecksum)
attributes 'Sentry-DSN': project.hasProperty('TABLEXIA_SENTRY_DSN_DEBUG') ? "$TABLEXIA_SENTRY_DSN_DEBUG" : "$project.sentryDSNFallbackValue";
attributes 'Sentry-DSN': project.sentryDSN
}
}
}
......@@ -62,7 +62,7 @@ task releaseJar(type: Jar) {
attributes 'Build-Type': 'release'
attributes 'Version-Name': tablexiaVersionName
attributes 'Assets-Cheksums': getMapConvertedToString(rootProject.ext.assetsChecksum)
attributes 'Sentry-DSN': project.hasProperty('TABLEXIA_SENTRY_DSN_RELEASE') ? "$TABLEXIA_SENTRY_DSN_RELEASE" : "$project.sentryDSNFallbackValue";
attributes 'Sentry-DSN': project.sentryDSN
}
}
}
......
......@@ -112,19 +112,17 @@ tasks.launchIOSDevice.doFirst {
tasks.create(name: "createDebugIPA", type: org.robovm.gradle.tasks.ArchiveTask) {
doFirst {
robovm.iosSignIdentity = TABLEXIA_IOS_SIGNING_IDENTITY
robovm.iosProvisioningProfile = TABLEXIA_IOS_DEBUG_PROVISIONING
String DSN = project.hasProperty('TABLEXIA_SENTRY_DSN_DEBUG') ? "$TABLEXIA_SENTRY_DSN_DEBUG" : sentryDSNFallbackValue;
updateRoboVMProperties("debug", applicationIdDebug, 'Icon_debug', DSN)
robovm.iosSignIdentity = TABLEXIA_IOS_SIGNING_IDENTITY
robovm.iosProvisioningProfile = TABLEXIA_IOS_DEBUG_PROVISIONING
updateRoboVMProperties("debug", applicationIdDebug, 'Icon_debug', project.sentryDSN)
}
}
tasks.create(name: "createReleaseIPA", type: org.robovm.gradle.tasks.ArchiveTask) {
doFirst {
robovm.iosSignIdentity = TABLEXIA_IOS_SIGNING_IDENTITY
robovm.iosProvisioningProfile = TABLEXIA_IOS_RELEASE_PROVISIONING
String DSN = project.hasProperty('TABLEXIA_SENTRY_DSN_RELEASE') ? "$TABLEXIA_SENTRY_DSN_RELEASE" : sentryDSNFallbackValue;
updateRoboVMProperties("release", applicationIdRelease, 'Icon_release', DSN)
robovm.iosSignIdentity = TABLEXIA_IOS_SIGNING_IDENTITY
robovm.iosProvisioningProfile = TABLEXIA_IOS_RELEASE_PROVISIONING
updateRoboVMProperties("release", applicationIdRelease, 'Icon_release', project.sentryDSN)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment