@@ -35,6 +35,18 @@ buildscript {
3535 }
3636 val obxJniLibVersion by extra(" io.objectbox:objectbox-$objectboxPlatform :$nativeVersion " )
3737
38+ println (" version=$obxJavaVersion " )
39+ println (" objectboxNativeDependency=$obxJniLibVersion " )
40+
41+ // To avoid duplicate release artifacts on the internal repository,
42+ // prevent publishing from branches other than publish, and main (for which publishing is turned off).
43+ val isCI = System .getenv(" CI" ) == " true"
44+ val branchOrTag = System .getenv(" CI_COMMIT_REF_NAME" )
45+ if (isCI && isRelease && ! (" publish" == branchOrTag || " main" == branchOrTag)) {
46+ throw GradleException (" isRelease = true only allowed on publish or main branch, but is $branchOrTag " )
47+ }
48+
49+ // Versions for third party dependencies and plugins
3850 val essentialsVersion by extra(" 3.1.0" )
3951 val junitVersion by extra(" 4.13.2" )
4052 val mockitoVersion by extra(" 3.8.0" )
@@ -47,17 +59,6 @@ buildscript {
4759 val coroutinesVersion by extra(" 1.7.3" )
4860 val dokkaVersion by extra(" 1.8.20" )
4961
50- println (" version=$obxJavaVersion " )
51- println (" objectboxNativeDependency=$obxJniLibVersion " )
52-
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 && isRelease && ! (" publish" == branchOrTag || " main" == branchOrTag)) {
58- throw GradleException (" isRelease = true is only allowed on branch publish or main" )
59- }
60-
6162 repositories {
6263 mavenCentral()
6364 maven {
0 commit comments