|
@@ -2,7 +2,9 @@
|
2
|
2
|
|
3
|
3
|
## Build your own, or use a pre-build SDK artifacts/binaries
|
4
|
4
|
|
5
|
|
-Jitsi conveniently provides a pre-build SDK artifacts/binaries in its Maven repository. When you do not require any modification to the SDK itself, it's suggested to use the pre-build SDK. This avoids the complexity of building and installing your own SDK artifacts/binaries.
|
|
5
|
+Jitsi conveniently provides a pre-build SDK artifacts/binaries in its Maven repository. When you do not require any
|
|
6
|
+modification to the SDK itself or any of its dependencies, it's suggested to use the pre-build SDK. This avoids the
|
|
7
|
+complexity of building and installing your own SDK artifacts/binaries.
|
6
|
8
|
|
7
|
9
|
### Use pre-build SDK artifacts/binaries
|
8
|
10
|
|
|
@@ -29,7 +31,7 @@ Dependency definitions belong in the individual module `build.gradle` files:
|
29
|
31
|
```gradle
|
30
|
32
|
dependencies {
|
31
|
33
|
// (other dependencies)
|
32
|
|
- implementation ('org.jitsi.react:jitsi-meet-sdk:+') { transitive = true }
|
|
34
|
+ implementation ('org.jitsi.react:jitsi-meet-sdk:2.+') { transitive = true }
|
33
|
35
|
}
|
34
|
36
|
```
|
35
|
37
|
|
|
@@ -44,49 +46,20 @@ A note on dependencies: Apart from the SDK, Jitsi also publishes a binary Maven
|
44
|
46
|
|
45
|
47
|
If you want to use a SDK that is built from source, you will likely benefit from composing a local Maven repository that contains these dependencies. The text below describes how you create a repository that includes both the SDK as well as these dependencies. For illustration purposes, we'll define the location of this local Maven repository as `/tmp/repo`
|
46
|
48
|
|
47
|
|
-In source code form, the Android SDK dependencies are locked/pinned by package.json and package-lock.json of the Jitsi Meet project. To obtain the data, execute NPM in the parent directory:
|
|
49
|
+In source code form, the Android SDK dependencies are locked/pinned by package.json and package-lock.json of the Jitsi Meet project. To obtain the data, execute NPM in the jitsi-meet project directory:
|
48
|
50
|
|
49
|
|
- $ (cd ..; npm install)
|
|
51
|
+ npm install
|
50
|
52
|
|
51
|
53
|
This will pull in the dependencies in either binary format, or in source code format, somewhere under /node_modules/
|
52
|
54
|
|
53
|
|
-At the time of writing, there are two packages pulled in in binary format.
|
54
|
|
-
|
55
|
|
-To copy React Native to your local Maven repository, you can simply copy part of the directory structure that was pulled in by NPM:
|
56
|
|
-
|
57
|
|
- $ cp -r ../node_modules/react-native/android/com /tmp/repo/
|
58
|
|
-
|
59
|
|
-Alternatively, you can use the scripts located in the android/scripts directory to publish these dependencies to your Maven repo.
|
60
|
|
-
|
61
|
|
-Third-party React Native _modules_, which Jitsi Meet SDK for Android depends on, are download by NPM in source code form. These need to be assembled into Maven artifacts, and then published to your local Maven repository. The SDK project facilitates this.
|
62
|
|
-
|
63
|
|
-To prepare, Configure the Maven repositories in which you are going to publish the SDK artifacts/binaries. In `android/sdk/build.gradle` as well as in `android/build.gradle` modify the lines that contain:
|
64
|
|
-
|
65
|
|
- "file:${rootProject.projectDir}/../../jitsi-maven-repository/releases"
|
66
|
|
-
|
67
|
|
-Change this value (which represents the Maven repository location used internally by the Jitsi Developers) to the location of the repository that you'd like to use:
|
68
|
|
-
|
69
|
|
- "file:/tmp/repo"
|
70
|
|
-
|
71
|
|
-Make sure to do this in both files! Each file should require one line to be changed.
|
72
|
|
-
|
73
|
|
-To prevent artifacts from previous builds affecting you're outcome, it's good to start with cleaning your work directories:
|
74
|
|
-
|
75
|
|
- $ ./gradlew clean
|
76
|
|
-
|
77
|
|
-To create the release assembly for any _specific_ third-party React Native module that you need, you can execture the following commands, replace the module name in the examples below.
|
78
|
|
-
|
79
|
|
- $ ./gradlew :react-native-webrtc:assembleRelease
|
80
|
|
- $ ./gradlew :react-native-webrtc:publish
|
81
|
|
-
|
82
|
|
-You build and publish the SDK itself in the same way:
|
83
|
|
-
|
84
|
|
- $ ./gradlew :sdk:assembleRelease
|
85
|
|
- $ ./gradlew :sdk:publish
|
|
55
|
+Third-party React Native _modules_, which Jitsi Meet SDK for Android depends on, are download by NPM in source code
|
|
56
|
+or binary form. These need to be assembled into Maven artifacts, and then published to your local Maven repository.
|
|
57
|
+A script is provided to facilitate this. From the root of the jitsi-meet project repository, run:
|
86
|
58
|
|
87
|
|
-Alternatively, you can assemble and publish _all_ subprojects, which include the react-native modules, but also the SDK itself, with a single command:
|
|
59
|
+ ./android/scripts/release-sdk.sh /tmp/repo
|
88
|
60
|
|
89
|
|
- $ ./gradlew clean assembleRelease publish
|
|
61
|
+This will build and publish the SDK, and all of its dependencies to the specified Maven repository (`/tmp/repo`) in
|
|
62
|
+this example.
|
90
|
63
|
|
91
|
64
|
You're now ready to use the artifacts. In _your_ project, add the Maven repository that you used above (`/tmp/repo`) into your top-level `build.gradle` file:
|
92
|
65
|
|
|
@@ -104,7 +77,8 @@ Then, define the dependency `org.jitsi.react:jitsi-meet-sdk` into the `build.gra
|
104
|
77
|
|
105
|
78
|
implementation ('org.jitsi.react:jitsi-meet-sdk:+') { transitive = true }
|
106
|
79
|
|
107
|
|
-Note that there should not be a need to explicitly add the other dependencies, as they will be pulled in as transitive dependencies of `jitsi-meet-sdk`.
|
|
80
|
+Note that there should not be a need to explicitly add the other dependencies, as they will be pulled in as transitive
|
|
81
|
+dependencies of `jitsi-meet-sdk`.
|
108
|
82
|
|
109
|
83
|
</details>
|
110
|
84
|
|