snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
51
android/settings.gradle
Normal file
51
android/settings.gradle
Normal file
@@ -0,0 +1,51 @@
|
||||
import groovy.json.JsonOutput
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
include ':app', ':sdk'
|
||||
|
||||
includeBuild('../node_modules/@react-native/gradle-plugin')
|
||||
|
||||
// Non-free RN modules, excluded when LIBRE_BUILD is set.
|
||||
def libreExcludedModules = [
|
||||
'@amplitude/analytics-react-native',
|
||||
'@giphy/react-native-sdk',
|
||||
'@react-native-google-signin/google-signin'
|
||||
]
|
||||
|
||||
// Autolinked RN module paths, consumed by sdk/build.gradle.
|
||||
gradle.ext.autolinkedProjects = []
|
||||
|
||||
def autolinkingJson = file('build/generated/autolinking/autolinking.json')
|
||||
if (!autolinkingJson.exists()) {
|
||||
throw new IllegalStateException(
|
||||
"Missing ${autolinkingJson}. Run `npm run android-autolinking` before building.")
|
||||
}
|
||||
|
||||
def json = new JsonSlurper().parseText(autolinkingJson.text)
|
||||
|
||||
// Filtered here so the includes below and sdk/build.gradle's codegen agree.
|
||||
def autolinkingManifest = autolinkingJson
|
||||
if ((System.env.LIBRE_BUILD ?: 'false').toBoolean()) {
|
||||
// Fail loudly if the list above was patched away.
|
||||
if (libreExcludedModules.isEmpty()) {
|
||||
throw new IllegalStateException('LIBRE_BUILD is set but libreExcludedModules is empty.')
|
||||
}
|
||||
|
||||
libreExcludedModules.each { json.dependencies.remove(it) }
|
||||
|
||||
autolinkingManifest = file('build/generated/autolinking/autolinking-libre.json')
|
||||
autolinkingManifest.text = JsonOutput.toJson(json)
|
||||
}
|
||||
gradle.ext.autolinkingManifest = autolinkingManifest
|
||||
|
||||
json.dependencies.each { name, config ->
|
||||
if (config.platforms?.android?.sourceDir) {
|
||||
|
||||
def projectName = name.replace('@', '').replace('/', '-')
|
||||
def sourceDir = config.platforms.android.sourceDir
|
||||
|
||||
include ":$projectName"
|
||||
project(":$projectName").projectDir = new File(sourceDir)
|
||||
gradle.ext.autolinkedProjects << ":$projectName".toString()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user