11buildscript {
22 ext {
33 // Typically, only edit those two:
4- def objectboxVersionNumber = ' 2.5.2 ' // without "-SNAPSHOT", e.g. '2.5.0' or '2.4.0-RC'
4+ def objectboxVersionNumber = ' 2.6.0 ' // without "-SNAPSHOT", e.g. '2.5.0' or '2.4.0-RC'
55 def objectboxVersionRelease = false // set to true for releasing to ignore versionPostFix to avoid e.g. "-dev" versions
66
77 // version post fix: '-<value>' or '' if not defined; e.g. used by CI to pass in branch name
@@ -20,6 +20,9 @@ buildscript {
2020 ob_native_dep = " io.objectbox:objectbox-$objectboxPlatform :$nativeVersion "
2121
2222 junit_version = ' 4.13'
23+ mockito_version = ' 3.3.3'
24+ kotlin_version = ' 1.3.72'
25+ dokka_version = ' 0.10.1'
2326
2427 println " version=$ob_version "
2528 println " objectboxNativeDependency=$ob_native_dep "
@@ -34,6 +37,8 @@ buildscript {
3437 }
3538
3639 dependencies {
40+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
41+ classpath " org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version "
3742 classpath " gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.0.5"
3843 }
3944}
@@ -64,9 +69,16 @@ def projectNamesToPublish = [
6469 ' objectbox-java-api' ,
6570 ' objectbox-java' ,
6671 ' objectbox-kotlin' ,
67- ' objectbox-rxjava'
72+ ' objectbox-rxjava' ,
73+ ' objectbox-rxjava3'
6874]
6975
76+ def hasSigningProperties () {
77+ return (project. hasProperty(' signingKeyId' )
78+ && project. hasProperty(' signingKeyFile' )
79+ && project. hasProperty(' signingPassword' ))
80+ }
81+
7082configure(subprojects. findAll { projectNamesToPublish. contains(it. name) }) {
7183 apply plugin : ' maven'
7284 apply plugin : ' signing'
@@ -82,8 +94,9 @@ configure(subprojects.findAll { projectNamesToPublish.contains(it.name) }) {
8294 }
8395
8496 signing {
85- if (project. hasProperty(' signing.keyId' ) && project. hasProperty(' signing.password' ) &&
86- project. hasProperty(' signing.secretKeyRingFile' )) {
97+ if (hasSigningProperties()) {
98+ String signingKey = new File (signingKeyFile). text
99+ useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
87100 sign configurations. archives
88101 } else {
89102 println " Signing information missing/incomplete for ${ project.name} "
@@ -104,6 +117,10 @@ configure(subprojects.findAll { projectNamesToPublish.contains(it.name) }) {
104117 } else if (preferredRepo != null
105118 && project. hasProperty(' preferredUsername' )
106119 && project. hasProperty(' preferredPassword' )) {
120+ if (! hasSigningProperties()) {
121+ throw new InvalidUserDataException (" To upload to repo signing is required." )
122+ }
123+
107124 configuration = configurations. deployerJars
108125
109126 // replace placeholders
@@ -129,7 +146,7 @@ configure(subprojects.findAll { projectNamesToPublish.contains(it.name) }) {
129146
130147 println " Uploading archives to $sonatypeRepositoryUrl . "
131148 } else {
132- println " WARNING: preferredRepo NOT set, can not upload archives."
149+ println " WARNING: preferredRepo or credentials NOT set, can not upload archives."
133150 }
134151
135152 pom. project {
0 commit comments