[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
apply plugin: 'com.android.library'
|
2017-09-12 01:12:11 +00:00
|
|
|
apply plugin: 'maven-publish'
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
2022-01-14 10:44:02 +00:00
|
|
|
ndkVersion rootProject.ext.ndkVersion
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
2019-04-30 10:24:12 +00:00
|
|
|
debug {
|
|
|
|
buildConfigField "boolean", "LIBRE_BUILD", "${rootProject.ext.libreBuild}"
|
2020-05-07 21:05:48 +00:00
|
|
|
buildConfigField "boolean", "GOOGLE_SERVICES_ENABLED", "${rootProject.ext.googleServicesEnabled}"
|
2019-04-30 10:24:12 +00:00
|
|
|
}
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2019-04-30 10:24:12 +00:00
|
|
|
buildConfigField "boolean", "LIBRE_BUILD", "${rootProject.ext.libreBuild}"
|
2020-05-07 21:05:48 +00:00
|
|
|
buildConfigField "boolean", "GOOGLE_SERVICES_ENABLED", "${rootProject.ext.googleServicesEnabled}"
|
2019-04-30 10:24:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
exclude "test/"
|
|
|
|
}
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-09-21 15:01:16 +00:00
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2022-04-28 12:25:07 +00:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.4.1'
|
|
|
|
implementation 'androidx.fragment:fragment:1.4.1'
|
2021-01-13 13:48:29 +00:00
|
|
|
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
2020-09-15 13:46:57 +00:00
|
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2019-11-26 18:50:01 +00:00
|
|
|
//noinspection GradleDynamicVersion
|
2018-09-21 15:01:16 +00:00
|
|
|
api 'com.facebook.react:react-native:+'
|
2020-09-28 13:27:56 +00:00
|
|
|
//noinspection GradleDynamicVersion
|
|
|
|
implementation 'org.webkit:android-jsc:+'
|
2022-04-28 12:25:07 +00:00
|
|
|
|
2022-03-30 13:54:03 +00:00
|
|
|
implementation 'com.facebook.fresco:animated-gif:2.5.0'
|
2021-09-01 12:21:03 +00:00
|
|
|
implementation 'com.dropbox.core:dropbox-core-sdk:4.0.1'
|
2019-08-28 10:31:38 +00:00
|
|
|
implementation 'com.jakewharton.timber:timber:4.7.1'
|
2019-10-11 10:05:45 +00:00
|
|
|
implementation 'com.squareup.duktape:duktape-android:1.3.0'
|
2021-02-04 12:26:35 +00:00
|
|
|
implementation 'com.google.code.gson:gson:2.8.6'
|
2021-10-07 08:56:19 +00:00
|
|
|
implementation "androidx.startup:startup-runtime:1.1.0"
|
2019-04-30 10:24:12 +00:00
|
|
|
|
2022-07-21 10:21:27 +00:00
|
|
|
// Only add these packages if we are NOT doing a LIBRE_BUILD
|
|
|
|
if (!rootProject.ext.libreBuild) {
|
2021-09-06 09:29:58 +00:00
|
|
|
implementation project(':react-native-amplitude')
|
2022-07-21 10:21:27 +00:00
|
|
|
implementation project(':react-native-giphy')
|
2019-04-30 10:24:12 +00:00
|
|
|
implementation(project(":react-native-google-signin")) {
|
|
|
|
exclude group: 'com.google.android.gms'
|
2019-08-15 14:54:31 +00:00
|
|
|
exclude group: 'androidx'
|
2019-04-30 10:24:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-10 13:53:55 +00:00
|
|
|
implementation project(':react-native-async-storage')
|
2018-09-21 15:01:16 +00:00
|
|
|
implementation project(':react-native-background-timer')
|
|
|
|
implementation project(':react-native-calendar-events')
|
2021-12-10 16:23:27 +00:00
|
|
|
implementation project(':react-native-community_clipboard')
|
2019-08-22 15:08:34 +00:00
|
|
|
implementation project(':react-native-community_netinfo')
|
2020-05-07 21:05:48 +00:00
|
|
|
implementation project(':react-native-default-preference')
|
2022-07-21 10:21:27 +00:00
|
|
|
implementation(project(':react-native-device-info')) {
|
|
|
|
exclude group: 'com.google.firebase'
|
|
|
|
exclude group: 'com.google.android.gms'
|
|
|
|
exclude group: 'com.android.installreferrer'
|
|
|
|
}
|
2021-10-20 19:29:21 +00:00
|
|
|
implementation project(':react-native-gesture-handler')
|
2021-10-25 10:04:51 +00:00
|
|
|
implementation project(':react-native-get-random-values')
|
2018-09-21 15:01:16 +00:00
|
|
|
implementation project(':react-native-immersive')
|
|
|
|
implementation project(':react-native-keep-awake')
|
2021-10-20 19:29:21 +00:00
|
|
|
implementation project(':react-native-masked-view_masked-view')
|
2022-01-07 14:11:58 +00:00
|
|
|
implementation project(':react-native-pager-view')
|
2021-09-07 14:38:44 +00:00
|
|
|
implementation project(':react-native-performance')
|
2021-10-20 19:29:21 +00:00
|
|
|
implementation project(':react-native-reanimated')
|
|
|
|
implementation project(':react-native-safe-area-context')
|
|
|
|
implementation project(':react-native-screens')
|
2021-07-27 14:08:33 +00:00
|
|
|
implementation project(':react-native-slider')
|
2018-09-21 15:01:16 +00:00
|
|
|
implementation project(':react-native-sound')
|
2021-07-27 14:08:33 +00:00
|
|
|
implementation project(':react-native-splash-screen')
|
2019-08-30 16:39:06 +00:00
|
|
|
implementation project(':react-native-svg')
|
2021-08-02 12:55:52 +00:00
|
|
|
implementation project(':react-native-video')
|
2018-09-21 15:01:16 +00:00
|
|
|
implementation project(':react-native-webrtc')
|
2019-05-07 14:50:57 +00:00
|
|
|
implementation project(':react-native-webview')
|
2018-09-21 15:01:16 +00:00
|
|
|
|
|
|
|
testImplementation 'junit:junit:4.12'
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-09-21 15:01:16 +00:00
|
|
|
// Here we bundle all assets, resources and React files. We cannot use the
|
|
|
|
// react.gradle file provided by react-native because it's designed to be used
|
|
|
|
// in an application (it taps into applicationVariants, but the SDK is a library
|
|
|
|
// so we need libraryVariants instead).
|
|
|
|
android.libraryVariants.all { def variant ->
|
|
|
|
// Create variant and target names
|
|
|
|
def targetName = variant.name.capitalize()
|
|
|
|
def targetPath = variant.dirName
|
|
|
|
|
|
|
|
// React js bundle directories
|
|
|
|
def jsBundleDir = file("$buildDir/generated/assets/react/${targetPath}")
|
|
|
|
def resourcesDir = file("$buildDir/generated/res/react/${targetPath}")
|
|
|
|
|
|
|
|
def jsBundleFile = file("$jsBundleDir/index.android.bundle")
|
|
|
|
|
|
|
|
def currentBundleTask = tasks.create(
|
|
|
|
name: "bundle${targetName}JsAndAssets",
|
|
|
|
type: Exec) {
|
|
|
|
group = "react"
|
|
|
|
description = "bundle JS and assets for ${targetName}."
|
|
|
|
|
|
|
|
// Create dirs if they are not there (e.g. the "clean" task just ran)
|
|
|
|
doFirst {
|
|
|
|
jsBundleDir.deleteDir()
|
|
|
|
jsBundleDir.mkdirs()
|
|
|
|
resourcesDir.deleteDir()
|
|
|
|
resourcesDir.mkdirs()
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set up inputs and outputs so gradle can cache the result
|
|
|
|
def reactRoot = file("${projectDir}/../../")
|
|
|
|
inputs.files fileTree(dir: reactRoot, excludes: ["android/**", "ios/**"])
|
|
|
|
outputs.dir jsBundleDir
|
|
|
|
outputs.dir resourcesDir
|
|
|
|
|
|
|
|
// Set up the call to the react-native cli
|
|
|
|
workingDir reactRoot
|
|
|
|
|
|
|
|
// Set up dev mode
|
|
|
|
def devEnabled = !targetName.toLowerCase().contains("release")
|
|
|
|
|
|
|
|
// Run the bundler
|
|
|
|
commandLine(
|
|
|
|
"node",
|
|
|
|
"node_modules/react-native/local-cli/cli.js",
|
|
|
|
"bundle",
|
|
|
|
"--platform", "android",
|
|
|
|
"--dev", "${devEnabled}",
|
|
|
|
"--reset-cache",
|
|
|
|
"--entry-file", "index.android.js",
|
|
|
|
"--bundle-output", jsBundleFile,
|
|
|
|
"--assets-dest", resourcesDir)
|
|
|
|
|
|
|
|
// Disable bundling on dev builds
|
|
|
|
enabled !devEnabled
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
}
|
|
|
|
|
2018-09-21 15:01:16 +00:00
|
|
|
currentBundleTask.ext.generatedResFolders = files(resourcesDir).builtBy(currentBundleTask)
|
|
|
|
currentBundleTask.ext.generatedAssetsFolders = files(jsBundleDir).builtBy(currentBundleTask)
|
|
|
|
variant.registerGeneratedResFolders(currentBundleTask.generatedResFolders)
|
|
|
|
|
2019-03-08 13:17:45 +00:00
|
|
|
def mergeAssetsTask = variant.mergeAssetsProvider.get()
|
|
|
|
def mergeResourcesTask = variant.mergeResourcesProvider.get()
|
|
|
|
|
|
|
|
mergeAssetsTask.dependsOn(currentBundleTask)
|
|
|
|
mergeResourcesTask.dependsOn(currentBundleTask)
|
|
|
|
|
|
|
|
mergeAssetsTask.doLast {
|
2020-09-24 06:19:57 +00:00
|
|
|
def assetsDir = mergeAssetsTask.outputDir.get()
|
2017-06-22 13:46:18 +00:00
|
|
|
|
2018-09-21 15:01:16 +00:00
|
|
|
// Bundle sounds
|
|
|
|
//
|
|
|
|
copy {
|
2021-08-26 14:44:32 +00:00
|
|
|
from("${projectDir}/../../sounds")
|
|
|
|
include("*.wav")
|
|
|
|
include("*.mp3")
|
2018-09-21 15:01:16 +00:00
|
|
|
into("${assetsDir}/sounds")
|
2018-04-05 19:12:24 +00:00
|
|
|
}
|
|
|
|
|
2018-09-21 15:01:16 +00:00
|
|
|
// Copy React assets
|
2017-06-22 13:46:18 +00:00
|
|
|
//
|
2018-09-21 15:01:16 +00:00
|
|
|
if (currentBundleTask.enabled) {
|
|
|
|
copy {
|
2019-03-08 13:17:45 +00:00
|
|
|
from(jsBundleFile)
|
2018-09-21 15:01:16 +00:00
|
|
|
into(assetsDir)
|
|
|
|
}
|
2017-06-22 13:46:18 +00:00
|
|
|
}
|
2018-09-21 15:01:16 +00:00
|
|
|
}
|
2017-06-22 13:46:18 +00:00
|
|
|
|
2019-03-08 13:17:45 +00:00
|
|
|
mergeResourcesTask.doLast {
|
2018-09-21 15:01:16 +00:00
|
|
|
// Copy React resources
|
|
|
|
//
|
|
|
|
if (currentBundleTask.enabled) {
|
|
|
|
copy {
|
|
|
|
from(resourcesDir)
|
2020-09-24 06:19:57 +00:00
|
|
|
into(mergeResourcesTask.outputDir.get())
|
2018-09-21 15:01:16 +00:00
|
|
|
}
|
|
|
|
}
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
}
|
|
|
|
}
|
2017-09-12 01:12:11 +00:00
|
|
|
|
2018-09-21 15:01:16 +00:00
|
|
|
|
2017-09-12 01:12:11 +00:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
aarArchive(MavenPublication) {
|
|
|
|
groupId 'org.jitsi.react'
|
|
|
|
artifactId 'jitsi-meet-sdk'
|
2019-04-12 12:56:41 +00:00
|
|
|
version System.env.OVERRIDE_SDK_VERSION ?: project.sdkVersion
|
2017-09-12 01:12:11 +00:00
|
|
|
|
|
|
|
artifact("${project.buildDir}/outputs/aar/${project.name}-release.aar") {
|
|
|
|
extension "aar"
|
|
|
|
}
|
|
|
|
pom.withXml {
|
|
|
|
def pomXml = asNode()
|
|
|
|
pomXml.appendNode('name', 'jitsi-meet-sdk')
|
|
|
|
pomXml.appendNode('description', 'Jitsi Meet SDK for Android')
|
|
|
|
def dependencies = pomXml.appendNode('dependencies')
|
|
|
|
configurations.getByName('releaseCompileClasspath').getResolvedConfiguration().getFirstLevelModuleDependencies().each {
|
|
|
|
// The (third-party) React Native modules that we depend on
|
|
|
|
// are in source code form and do not have groupId. That is
|
|
|
|
// why we have a dedicated groupId for them. But the other
|
|
|
|
// dependencies come through Maven and, consequently, have
|
|
|
|
// groupId.
|
|
|
|
def groupId = it.moduleGroup
|
|
|
|
def artifactId = it.moduleName
|
|
|
|
|
2021-11-25 12:55:24 +00:00
|
|
|
if (artifactId.startsWith('react-native-')) {
|
2017-09-12 01:12:11 +00:00
|
|
|
groupId = rootProject.ext.moduleGroupId
|
|
|
|
}
|
|
|
|
|
|
|
|
def dependency = dependencies.appendNode('dependency')
|
|
|
|
dependency.appendNode('groupId', groupId)
|
|
|
|
dependency.appendNode('artifactId', artifactId)
|
|
|
|
dependency.appendNode('version', it.moduleVersion)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
repositories {
|
2019-04-11 12:01:52 +00:00
|
|
|
maven {
|
|
|
|
url rootProject.ext.mavenRepo
|
|
|
|
if (!rootProject.ext.mavenRepo.startsWith("file")) {
|
|
|
|
credentials {
|
|
|
|
username rootProject.ext.mavenUser
|
|
|
|
password rootProject.ext.mavenPassword
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-12 01:12:11 +00:00
|
|
|
}
|
|
|
|
}
|