Skip to content

Commit 7ced7cc

Browse files
committed
Update README.md and CONTRIBUTING.md
1 parent 87398ba commit 7ced7cc

File tree

2 files changed

+60
-70
lines changed

2 files changed

+60
-70
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
# Contributing to KRDB, Kotlin SDK for Realm DB
1+
# Contributing to Infomaniak's fork of Kotlin SDK for Realm DB
22

3-
We welcomes all contributions!
3+
Contributions are welcome!
4+
5+
Please make sure we agreed about what is to be done in an issue,
6+
or that it's a trivial improvement with little to review.
47

58
## How to build locally
69

@@ -9,7 +12,7 @@ We welcomes all contributions!
912
- Swig 4.2.0 or above. On Mac this can be installed using Homebrew: `brew install swig`.
1013
- Ccache. On Mac this can be installed using Homebrew: `brew install ccache`.
1114
- CMake 3.18.1 or above. Can be installed through the Android SDK Manager.
12-
- Java 17.
15+
- Java 17 or above.
1316
- Define environment variables:
1417
- `ANDROID_HOME`
1518
- `JAVA_HOME`
@@ -19,9 +22,13 @@ We welcomes all contributions!
1922

2023
Checkout repo:
2124
```sh
22-
git clone --recursive https://github.com/XilinJia/krdb.git
25+
git clone --recursive https://github.com/Infomaniak/realm-kotlin.git
2326
```
2427

28+
**WARNING:** Make sure the git modules are pointing to the correct revision.
29+
Otherwise, you might encounter puzzling CMake compilation or runtime errors,
30+
even if the prerequisites specified above are fulfilled.
31+
2532
### Windows support
2633

2734
The repository can be built on Windows, although only for the JVM and Android targets. Beware of the following requirements:

README.md

Lines changed: 49 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,87 @@
1-
### This is a fork and rebranding of [Realm Kotlin](https://github.com/XilinJia/realm-kotlin) which is a fork of the deprecated [Realm Kotlin](https://github.com/realm/realm-kotlin). This has been made compatible with Kotlin 2.1+ while updating various dependencies
1+
# Infomaniak's fork of [Realm Kotlin](https://github.com/realm/realm-kotlin)
22

3-
JVM has been tested to work the same as with builds with Kotlin 2.0.x. Android, iOS and MacOS has been tested to work.
3+
This is a fork of the deprecated [Realm Kotlin](https://github.com/realm/realm-kotlin).
4+
It has been made compatible with Kotlin 2.2.0 thanks to the work of @XilinJia
5+
on their [krdb](https://github.com/XilinJia/krdb) fork (we cherry-picked some of their commits).
46

5-
Unlike the forked repo, this one can be built from source on Linux.
6-
7-
Project structure is changed to make Intellij IDE work. gradlew needs to be run from the root directory rather than packages.
8-
9-
Testing are performed on the dev versions. Maven artifacts can be published (tested locally), but can not be tested upon yet.
10-
11-
### Version compatibility
7+
We have reversed the rebranding so it can be used as a drop-in replacement with builds published
8+
to a local or private maven repository.
129

13-
krdb 3.2.8 <==> Kotlin 2.2.0
10+
We have checked the diff between our revision and Realm's original project to be exempt from any
11+
suspicious code or reference to unchecked binaries.
1412

15-
krdb 3.2.6/7 <==> Kotlin 2.1.20
16-
17-
krdb 3.2.5 <==> Kotlin 2.1.10
18-
19-
### Published to Maven Central, how to use:
13+
Unlike the forked repo, this one can be built from source on Linux.
2014

21-
#### Note, the maven artifacts are built on Linux and lack support for iOS and MacOS, hopefully a github actions can resolve this later
15+
Project structure is changed to make Intellij IDE work.
16+
gradlew needs to be run from the root directory rather than packages.
2217

23-
* in project build.gradle, add:
24-
```
25-
buildscript {
26-
dependencies {
27-
classpath "io.github.xilinjia.krdb:gradle-plugin:y.y.y"
28-
}
29-
}
30-
```
31-
and remove:
32-
```
33-
id 'io.realm.kotlin' version 'x.x.x' apply false
34-
```
18+
## Version compatibility
3519

36-
* in the app build.gradle
20+
Version 3.2.8 <==> Kotlin 2.2.0
3721

38-
in the plugins block, replace:
39-
```id 'io.realm.kotlin' ```
40-
with
41-
``` id 'io.github.xilinjia.krdb' ```
22+
## How to use:
4223

43-
replace:
44-
```implementation "io.realm.kotlin:library-base:x.x.x" ```
45-
with:
46-
```implementation "io.github.xilinjia.krdb:library-base:y.y.y" ```
24+
This project is NOT YET published to a maven repo.
4725

48-
and replace:
49-
```apply plugin: "io.realm.kotlin" ```
50-
with
51-
```apply plugin: "io.github.xilinjia.krdb" ```
26+
### Build the project
5227

53-
* in all kotlin files, replace "io.realm.kotlin" with "io.github.xilinjia.krdb"
54-
* and of course, change your Kotlin to 2.x.y (refer to Version compatibility)
28+
#### Prerequisites
5529

56-
### To use this with a local build
30+
- Swig 4.2.0 or above. On Mac this can be installed using Homebrew: `brew install swig`.
31+
- Ccache. On Mac this can be installed using Homebrew: `brew install ccache`.
32+
- CMake 3.18.1 or above. Can be installed through the Android SDK Manager, or homebrew.
33+
- Java 17 or above.
34+
- Define environment variables:
35+
- `ANDROID_HOME`
36+
- `JAVA_HOME`
37+
- `NDK_HOME`
38+
- clone this project **with submodules** (don't skip the `--recursive` option for that):
39+
```git clone --recursive https://github.com/Infomaniak/realm-kotlin.git ```
5740

58-
In addition to the above,
41+
#### Gradle commands
5942

60-
* clone this project with:
61-
```git clone --recursive https://github.com/XilinJia/krdb.git ```
62-
* build in the project root directory with:
6343
```
6444
./gradlew clean
6545
./gradlew jvmTest
6646
./gradlew publishToMavenLocal
6747
```
68-
* in Android project, in settings.gradle at the project level, add in the beginning:
48+
49+
### Setup the repository
50+
51+
* in project's `settings.gradle[.kts]`, add:
6952
```
7053
pluginManagement {
7154
repositories {
72-
mavenLocal() // 👈 Add this line
73-
google()
55+
gradlePluginPortal()
7456
mavenCentral()
57+
// Other repos...
58+
mavenLocal() // <--- 👈 Add this.
59+
}
60+
}
61+
62+
dependencyResolutionManagement {
63+
// repositoriesMode...
64+
repositories {
65+
// Other repos...
66+
mavenLocal() // <--- 👈 Add this.
7567
}
7668
}
7769
```
78-
* in project build.gradle, add:
70+
71+
* in project's `build.gradle[.kts]`, add:
7972
```
8073
buildscript {
81-
repositories {
82-
mavenLocal()
83-
}
8474
dependencies {
85-
classpath "io.github.xilinjia.krdb:gradle-plugin:y.y.y"
86-
}
87-
}
88-
allprojects {
89-
repositories {
90-
mavenLocal()
75+
classpath("io.realm.kotlin:gradle-plugin:y.y.y")
9176
}
9277
}
9378
```
79+
* remove the version in the declarations in the `plugins` blocks
80+
* and of course, change your Kotlin to 2.x.y (refer to Version compatibility)
9481

9582
------------------------------------
9683

97-
Original Readme of Realm-Kotlin can be referenced [here](https://github.com/realm/realm-kotlin)
84+
Original Readme of Realm-Kotlin can be found [here](https://github.com/realm/realm-kotlin)
9885

9986
# Contributing
10087

@@ -104,7 +91,3 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more details!
10491
# License
10592

10693
Realm Kotlin is published under the [Apache 2.0 license](LICENSE).
107-
108-
This product is not being made available to any person located in Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, or to any other person that is not eligible to receive the product under U.S. law.
109-
110-
<img style="width: 0px; height: 0px;" src="https://3eaz4mshcd.execute-api.us-east-1.amazonaws.com/prod?s=https://github.com/realm/realm-kotlin#README.md">

0 commit comments

Comments
 (0)