2023-12-07 21:19:43 +00:00
|
|
|
pluginManagement {
|
2024-08-19 15:24:50 +00:00
|
|
|
if (!gradle.hasProperty("mozconfig")){
|
|
|
|
apply from: file('mobile/android/gradle/mozconfig.gradle')
|
|
|
|
}
|
2024-01-18 14:38:47 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
|
|
|
maven {
|
|
|
|
url repository
|
|
|
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
|
|
|
allowInsecureProtocol = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-15 09:19:16 +00:00
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/config")
|
2023-12-07 21:19:43 +00:00
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/dependencies")
|
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/publicsuffixlist")
|
2023-12-15 09:19:16 +00:00
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/fenix/plugins/apksize")
|
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/fenix/plugins/fenixdependencies")
|
2023-12-19 19:00:04 +00:00
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/focus-android/plugins/focusdependencies")
|
2023-12-07 21:19:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
plugins {
|
2023-12-15 09:19:16 +00:00
|
|
|
id "mozac.ConfigPlugin"
|
2023-12-07 21:19:43 +00:00
|
|
|
id 'mozac.DependenciesPlugin'
|
2023-12-15 09:19:16 +00:00
|
|
|
id 'ApkSizePlugin'
|
|
|
|
id 'FenixDependenciesPlugin'
|
2023-12-19 19:00:04 +00:00
|
|
|
id 'FocusDependenciesPlugin'
|
2023-12-07 21:19:43 +00:00
|
|
|
}
|
|
|
|
|
2015-10-21 22:07:55 +00:00
|
|
|
// You might think topsrcdir is '.', but that's not true when the Gradle build
|
|
|
|
// is launched from within IntelliJ.
|
2023-12-07 21:19:37 +00:00
|
|
|
ext.topsrcdir = rootProject.projectDir.absolutePath
|
2015-10-21 22:07:55 +00:00
|
|
|
|
2023-12-07 21:19:37 +00:00
|
|
|
apply from: "${topsrcdir}/mobile/android/shared-settings.gradle"
|
2024-05-10 06:21:28 +00:00
|
|
|
apply from: "${topsrcdir}/mobile/android/autopublish-settings.gradle"
|
2015-10-20 17:32:26 +00:00
|
|
|
|
2015-12-10 15:51:42 +00:00
|
|
|
// Set the Android SDK location. This is the *least specific* mechanism, which
|
|
|
|
// is unfortunate: we'd prefer to use the *most specific* mechanism. That is,
|
|
|
|
// local.properties (first 'sdk.dir', then 'android.dir') and then the
|
|
|
|
// environment variable ANDROID_HOME will override this. That's unfortunate,
|
|
|
|
// but it's hard to automatically arrange better.
|
2023-12-07 21:19:37 +00:00
|
|
|
System.setProperty('android.home', gradle.mozconfig.substs.ANDROID_SDK_ROOT)
|
2015-12-10 15:51:42 +00:00
|
|
|
|
2019-11-22 13:30:57 +00:00
|
|
|
include ':annotations', ':messaging_example', ':port_messaging_example'
|
2016-10-06 03:23:38 +00:00
|
|
|
include ':geckoview'
|
2022-01-11 19:16:02 +00:00
|
|
|
include ':exoplayer2'
|
2023-12-15 09:19:16 +00:00
|
|
|
include ':mozilla-lint-rules'
|
2024-11-06 17:36:23 +00:00
|
|
|
include ':android-components'
|
2015-10-21 22:07:55 +00:00
|
|
|
|
2023-12-07 21:19:37 +00:00
|
|
|
project(':annotations').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/annotations")
|
|
|
|
project(':geckoview').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/geckoview")
|
|
|
|
project(':exoplayer2').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/exoplayer2")
|
2023-12-07 21:19:43 +00:00
|
|
|
project(':android-components').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/android-components")
|
2024-11-06 17:36:23 +00:00
|
|
|
|
|
|
|
if (!gradle.mozconfig.substs.MOZ_ANDROID_SUBPROJECT || gradle.mozconfig.substs.MOZ_ANDROID_SUBPROJECT == "fenix") {
|
|
|
|
include ':fenix'
|
|
|
|
project(':fenix').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/fenix/app")
|
|
|
|
}
|
|
|
|
if (!gradle.mozconfig.substs.MOZ_ANDROID_SUBPROJECT || gradle.mozconfig.substs.MOZ_ANDROID_SUBPROJECT == "focus") {
|
|
|
|
include ':focus-android'
|
|
|
|
project(':focus-android').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/focus-android/app")
|
|
|
|
}
|
|
|
|
if (!gradle.mozconfig.substs.MOZ_ANDROID_SUBPROJECT || gradle.mozconfig.substs.MOZ_ANDROID_SUBPROJECT == "geckoview_example") {
|
|
|
|
include ':samples-browser'
|
|
|
|
include ':geckoview_example'
|
|
|
|
include ':test_runner'
|
|
|
|
project(':test_runner').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/test_runner")
|
|
|
|
project(':geckoview_example').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/geckoview_example")
|
|
|
|
project(':samples-browser').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/android-components/samples/browser")
|
|
|
|
}
|
2015-10-21 22:07:55 +00:00
|
|
|
|
2022-11-18 00:55:03 +00:00
|
|
|
if (hasProperty("androidFormatLintTest")) {
|
|
|
|
include ':androidFormatLintTest'
|
2023-12-07 21:19:37 +00:00
|
|
|
project(':androidFormatLintTest').projectDir = new File("${gradle.mozconfig.topsrcdir}/tools/lint/test/files/android-format")
|
2022-11-18 00:55:03 +00:00
|
|
|
}
|
|
|
|
|
2019-11-22 13:30:57 +00:00
|
|
|
project(':messaging_example').projectDir = new File('mobile/android/examples/messaging_example/app')
|
2021-09-29 17:54:57 +00:00
|
|
|
project(':port_messaging_example').projectDir = new File('mobile/android/examples/port_messaging_example/app')
|