@@ -35,6 +35,18 @@ buildscript {
35
35
}
36
36
val obxJniLibVersion by extra(" io.objectbox:objectbox-$objectboxPlatform :$nativeVersion " )
37
37
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
38
50
val essentialsVersion by extra(" 3.1.0" )
39
51
val junitVersion by extra(" 4.13.2" )
40
52
val mockitoVersion by extra(" 3.8.0" )
@@ -47,17 +59,6 @@ buildscript {
47
59
val coroutinesVersion by extra(" 1.7.3" )
48
60
val dokkaVersion by extra(" 1.8.20" )
49
61
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
-
61
62
repositories {
62
63
mavenCentral()
63
64
maven {
0 commit comments