diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f88da22725da85f2ae58b6ec4dcbbb8f4bc3eea9..c50a536a241fd986b49f8e80acc98e9b55b7d540 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,6 +15,12 @@ cache: lib: stage: lib + rules: + - if: '$CI_COMMIT_TAG !~ "/^$/"' + when: always + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: always + - when: manual script: - ./gradlew :lib:assembleRelease artifacts: @@ -23,5 +29,10 @@ lib: publish: stage: publish + needs: + - lib + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: manual script: - ./gradlew :lib:publish diff --git a/lib/build.gradle b/lib/build.gradle index bc680ce84bd4a4983297bdcfefc595dc439757f8..8a9c0a9656f4c679e8b46e1aeb0f20a2b6136eb6 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -6,7 +6,7 @@ plugins { def versionMajor = 0 def versionMinor = 0 -def versionPatch = 6 +def versionPatch = 7 def releasePatch = "alpha" android { diff --git a/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt b/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt index 5f5765f1eaea44130cd9ffd7cced16669e360688..f6334517557e1ae6a6a974a1658b9011d779247c 100644 --- a/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt +++ b/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt @@ -25,15 +25,18 @@ object Telemetry { * @param application: the application context */ @JvmStatic - fun init(identifier: String, application: Application, enableOsTag: Boolean) { + fun init(identifier: String, application: Application, enableOsTag: Boolean = true) { this.identifier = identifier this.application = application this.enableOsTag = enableOsTag this.isTelemetryEnabled = checkTelemetryDeveloperOption() val sentryDsn = - if (isTelemetryEnabled) identifier - else String() + if (isTelemetryEnabled) { + identifier + } else { + String() + } SentryAndroid.init(application) { options -> options.dsn = sentryDsn