@@ -18,14 +18,6 @@ buildscript {
1818 val objectboxVersionRelease =
1919 false // set to true for releasing to ignore versionPostFix to avoid e.g. "-dev" versions
2020
21- // To avoid duplicate release artifacts on the internal repository,
22- // prevent uploading from branches other than publish, and main (for which uploading is turned off).
23- val isCI = System .getenv(" CI" ) == " true"
24- val branchOrTag = System .getenv(" CI_COMMIT_REF_NAME" )
25- if (isCI && objectboxVersionRelease && ! (" publish" == branchOrTag || " main" == branchOrTag)) {
26- throw GradleException (" objectboxVersionRelease = true is only allowed on branch publish or main" )
27- }
28-
2921 // version post fix: "-<value>" or "" if not defined; e.g. used by CI to pass in branch name
3022 val versionPostFixValue = project.findProperty(" versionPostFix" )
3123 val versionPostFix = if (versionPostFixValue != null ) " -$versionPostFixValue " else " "
@@ -58,6 +50,14 @@ buildscript {
5850 println (" version=$obxJavaVersion " )
5951 println (" objectboxNativeDependency=$obxJniLibVersion " )
6052
53+ // To avoid duplicate release artifacts on the internal repository,
54+ // prevent uploading from branches other than publish, and main (for which uploading is turned off).
55+ val isCI = System .getenv(" CI" ) == " true"
56+ val branchOrTag = System .getenv(" CI_COMMIT_REF_NAME" )
57+ if (isCI && objectboxVersionRelease && ! (" publish" == branchOrTag || " main" == branchOrTag)) {
58+ throw GradleException (" objectboxVersionRelease = true is only allowed on branch publish or main" )
59+ }
60+
6161 repositories {
6262 mavenCentral()
6363 maven {
0 commit comments