Skip to content

Commit f06ad84

Browse files
author
Eduardo López
committed
Merge branch 'master' into support-new-datatypes
# Conflicts: # version.txt
2 parents caa2c2a + 5be74cf commit f06ad84

File tree

32 files changed

+350
-1063
lines changed

32 files changed

+350
-1063
lines changed

CHANGELOG.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,50 @@
1-
## 10.4.0 (YYYY-MM-DD)
1+
## 10.4.0 (2021-03-26)
2+
3+
All releases from 10.4.0 and forward are now found on `mavenCentral()` instead of `jcenter()`.
4+
5+
A minimal supported setup will therefore now look like this:
6+
7+
```
8+
allprojects {
9+
buildscript {
10+
repositories {
11+
mavenCentral()
12+
}
13+
dependencies {
14+
classpath "io.realm:realm-gradle-plugin:10.4.0"
15+
}
16+
}
17+
18+
repositories {
19+
mavenCentral()
20+
}
21+
}
22+
```
23+
24+
`SNAPSHOT` releases have also been moved from `http://oss.jfrog.org/artifactory/oss-snapshot-local`
25+
to `https://oss.sonatype.org/content/repositories/snapshots/`. See [here](https://github.com/realm/realm-java/blob/master/README.md#using-snapshots)
26+
for more information.
227

328
### Enhancements
429
* Added support for `java.util.UUID` as supported field in model classes.
530
* Added support for `java.util.UUID` as a primary key.
631
* Added support for the string-based Realm Query Language through `RealmQuery.rawPredicate(...)`. This allows many new type of queries not previously supported by the typed query API. See the Javadoc on this method for further details. (Issue [#6116](https://github.com/realm/realm-java/pull/6116))
32+
* Performance of sorting on more than one property has been improved. Especially important if many elements match on the first property.
733

834
### Fixes
9-
* None
35+
* Calling max/min/sum/avg on a List may give wrong results (Realm Core [#4252](https://github.com/realm/realm-core/issues/4252), since v10.0.0)
36+
* Fix an issue when using `RealmResults.freeze()` across threads with different transaction versions. Previously, copying the `RealmsResults`' native resource could result in a stale state or objects from a future version. (Realm Core [#4254](https://github.com/realm/realm-core/pull/4254)).
37+
* On 32-bit devices you may get exception with "No such object" when upgrading to v10.* ([#7314](https://github.com/realm/realm-java/issues/7314), since v10.0.0)
1038

1139
### Compatibility
1240
* File format: Generates Realms with format v20. Unsynced Realms will be upgraded from Realm Java 2.0 and later. Synced Realms can only be read and upgraded if created with Realm Java v10.0.0-BETA.1.
1341
* APIs are backwards compatible with all previous release of realm-java in the 10.x.y series.
1442
* Realm Studio 10.0.0 or above is required to open Realms created by this version.
1543

1644
### Internal
17-
* Updated to Realm Core commit: df57de0101b5b817f8f4158cf45e11985cd640c2.
45+
* Updated to Realm Core 10.5.6, commit 92129110dece2cee59839e20be3a7067084a1196.
1846
* Updated to NDK 22.0.7026061.
19-
47+
* Updated to ReLinker 1.4.3.
2048

2149
## 10.3.1 (2021-01-28)
2250

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ RUN yes | sdkmanager --licenses
6969
# The `yes` is for accepting all non-standard tool licenses.
7070
# Please keep all sections in descending order!
7171
RUN yes | sdkmanager \
72-
'build-tools;29.0.3' \
72+
'build-tools;30.0.3' \
7373
'emulator' \
7474
'extras;android;m2repository' \
75-
'platforms;android-29' \
75+
'platforms;android-30' \
7676
'platform-tools' \
7777
'ndk;22.0.7026061' \
7878
'system-images;android-29;default;x86'

Jenkinsfile

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ enableIntegrationTests = true
1818

1919
// Will store whether or not this build was successful.
2020
buildSuccess = false
21-
// Will be set to `true` if this build is a full release that should be available on Bintray.
21+
// Will be set to `true` if this build is a full release that should be available on Maven Central.
2222
// This is determined by comparing the current git tag to the version number of the build.
2323
publishBuild = false
2424
mongoDbRealmContainer = null
2525
mongoDbRealmCommandServerContainer = null
2626
emulatorContainer = null
2727
dockerNetworkId = UUID.randomUUID().toString()
28-
currentBranch = env.BRANCH_NAME
28+
currentBranch = (env.CHANGE_BRANCH == null) ? env.BRANCH_NAME : env.CHANGE_BRANCH
29+
isReleaseBranch = releaseBranches.contains(currentBranch)
2930
// FIXME: Always used the emulator until we can enable more reliable devices
3031
// 'android' nodes have android devices attached and 'brix' are physical machines in Copenhagen.
3132
// nodeSelector = (releaseBranches.contains(currentBranch)) ? 'android' : 'docker-cph-03' // Switch to `brix` when all CPH nodes work: https://jira.mongodb.org/browse/RCI-14
@@ -50,6 +51,7 @@ try {
5051

5152
// Check type of Build. We are treating this as a release build if we are building
5253
// the exact Git SHA that was tagged.
54+
echo "Building from branch: $currentBranch"
5355
gitTag = readGitTag()
5456
echo "Git tag: ${gitTag ?: 'none'}"
5557
if (!gitTag) {
@@ -83,7 +85,7 @@ try {
8385
def instrumentationTestTarget = "connectedAndroidTest"
8486
def deviceSerial = ""
8587

86-
if (!releaseBranches.contains(currentBranch)) {
88+
if (!isReleaseBranch) {
8789
// Build development branch
8890
useEmulator = true
8991
emulatorImage = "system-images;android-29;default;x86"
@@ -225,8 +227,17 @@ try {
225227
def runBuild(buildFlags, instrumentationTestTarget) {
226228

227229
stage('Build') {
228-
sh "chmod +x gradlew"
229-
sh "./gradlew assemble ${buildFlags} --stacktrace"
230+
withCredentials([
231+
[$class: 'StringBinding', credentialsId: 'maven-central-java-ring-file', variable: 'SIGN_KEY'],
232+
[$class: 'StringBinding', credentialsId: 'maven-central-java-ring-file-password', variable: 'SIGN_KEY_PASSWORD'],
233+
]) {
234+
sh "chmod +x gradlew"
235+
def signingFlags = ""
236+
if (isReleaseBranch) {
237+
signingFlags = "-PsignBuild=true -PsignSecretRingFile=\"${SIGN_KEY}\" -PsignPassword=${SIGN_KEY_PASSWORD}"
238+
}
239+
sh "./gradlew assemble ${buildFlags} ${signingFlags} --stacktrace"
240+
}
230241
}
231242

232243
stage('Tests') {
@@ -309,16 +320,19 @@ def runBuild(buildFlags, instrumentationTestTarget) {
309320

310321
// TODO: add support for running monkey on the example apps
311322

312-
if (['master'].contains(currentBranch)) {
323+
def collectMetrics = ['master'].contains(currentBranch)
324+
echo "Collecting metrics: $collectMetrics"
325+
if (collectMetrics) {
313326
stage('Collect metrics') {
314327
collectAarMetrics()
315328
}
316329
}
317330

318-
if (releaseBranches.contains(currentBranch) && !publishBuild) {
319-
stage('Publish to OJO') {
320-
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'bintray', passwordVariable: 'BINTRAY_KEY', usernameVariable: 'BINTRAY_USER']]) {
321-
sh "chmod +x gradlew && ./gradlew -PbintrayUser=${env.BINTRAY_USER} -PbintrayKey=${env.BINTRAY_KEY} ojoUpload ${buildFlags} --stacktrace"
331+
echo "Releasing SNAPSHOT: ($isReleaseBranch, $publishBuild)"
332+
if (isReleaseBranch && !publishBuild) {
333+
stage('Publish SNAPSHOT') {
334+
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'maven-central-credentials', passwordVariable: 'MAVEN_CENTRAL_PASSWORD', usernameVariable: 'MAVEN_CENTRAL_USER']]) {
335+
sh "chmod +x gradlew && ./gradlew mavenCentralUpload ${buildFlags} -PossrhUsername='$MAVEN_CENTRAL_USER' -PossrhPassword='$MAVEN_CENTRAL_PASSWORD' --stacktrace"
322336
}
323337
}
324338
}
@@ -329,13 +343,13 @@ def runPublish() {
329343
withCredentials([
330344
[$class: 'StringBinding', credentialsId: 'slack-webhook-java-ci-channel', variable: 'SLACK_URL_CI'],
331345
[$class: 'StringBinding', credentialsId: 'slack-webhook-releases-channel', variable: 'SLACK_URL_RELEASE'],
332-
[$class: 'UsernamePasswordMultiBinding', credentialsId: 'bintray', passwordVariable: 'BINTRAY_KEY', usernameVariable: 'BINTRAY_USER'],
346+
[$class: 'UsernamePasswordMultiBinding', credentialsId: 'maven-central-credentials', passwordVariable: 'MAVEN_CENTRAL_PASSWORD', usernameVariable: 'MAVEN_CENTRAL_USER'],
333347
[$class: 'AmazonWebServicesCredentialsBinding', accessKeyVariable: 'DOCS_S3_ACCESS_KEY', credentialsId: 'mongodb-realm-docs-s3', secretKeyVariable: 'DOCS_S3_SECRET_KEY'],
334348
[$class: 'AmazonWebServicesCredentialsBinding', accessKeyVariable: 'REALM_S3_ACCESS_KEY', credentialsId: 'realm-s3', secretKeyVariable: 'REALM_S3_SECRET_KEY']
335349
]) {
336350
sh """
337351
set +x
338-
sh tools/publish_release.sh '$BINTRAY_USER' '$BINTRAY_KEY' \
352+
sh tools/publish_release.sh '$MAVEN_CENTRAL_USER' '$MAVEN_CENTRAL_PASSWORD' \
339353
'$REALM_S3_ACCESS_KEY' '$REALM_S3_SECRET_KEY' \
340354
'$DOCS_S3_ACCESS_KEY' '$DOCS_S3_SECRET_KEY' \
341355
'$SLACK_URL_RELEASE' \

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ If you want to test recent bugfixes or features that have not been packaged in a
3939
```
4040
buildscript {
4141
repositories {
42-
jcenter()
42+
mavenCentral()
4343
google()
4444
maven {
45-
url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
45+
url 'https://oss.sonatype.org/content/repositories/snapshots/'
4646
}
47+
jcenter()
4748
}
4849
dependencies {
4950
classpath "io.realm:realm-gradle-plugin:<version>-SNAPSHOT"
@@ -52,11 +53,12 @@ buildscript {
5253
5354
allprojects {
5455
repositories {
55-
jcenter()
56+
mavenCentral()
5657
google()
5758
maven {
58-
url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
59+
url 'https://oss.sonatype.org/content/repositories/snapshots/'
5960
}
61+
jcenter()
6062
}
6163
}
6264
```

0 commit comments

Comments
 (0)