2023-12-08 00:19:43 +03:00
|
|
|
pluginManagement {
|
2024-08-19 18:24:50 +03:00
|
|
|
if (!gradle.hasProperty("mozconfig")){
|
|
|
|
apply from: file('mobile/android/gradle/mozconfig.gradle')
|
|
|
|
}
|
2024-01-18 17:38:47 +03: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 12:19:16 +03:00
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/config")
|
2023-12-08 00:19:43 +03:00
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/dependencies")
|
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/publicsuffixlist")
|
2023-12-15 12:19:16 +03:00
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/fenix/plugins/apksize")
|
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/fenix/plugins/fenixdependencies")
|
2023-12-19 22:00:04 +03:00
|
|
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/focus-android/plugins/focusdependencies")
|
2023-12-08 00:19:43 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
plugins {
|
2023-12-15 12:19:16 +03:00
|
|
|
id "mozac.ConfigPlugin"
|
2023-12-08 00:19:43 +03:00
|
|
|
id 'mozac.DependenciesPlugin'
|
2023-12-15 12:19:16 +03:00
|
|
|
id 'ApkSizePlugin'
|
|
|
|
id 'FenixDependenciesPlugin'
|
2023-12-19 22:00:04 +03:00
|
|
|
id 'FocusDependenciesPlugin'
|
2023-12-08 00:19:43 +03:00
|
|
|
}
|
|
|
|
|
2015-10-22 01:07:55 +03:00
|
|
|
// You might think topsrcdir is '.', but that's not true when the Gradle build
|
|
|
|
// is launched from within IntelliJ.
|
2023-12-08 00:19:37 +03:00
|
|
|
ext.topsrcdir = rootProject.projectDir.absolutePath
|
2015-10-22 01:07:55 +03:00
|
|
|
|
2023-12-08 00:19:37 +03:00
|
|
|
apply from: "${topsrcdir}/mobile/android/shared-settings.gradle"
|
2024-05-10 09:21:28 +03:00
|
|
|
apply from: "${topsrcdir}/mobile/android/autopublish-settings.gradle"
|
2015-10-20 20:32:26 +03:00
|
|
|
|
2015-12-10 18:51:42 +03: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-08 00:19:37 +03:00
|
|
|
System.setProperty('android.home', gradle.mozconfig.substs.ANDROID_SDK_ROOT)
|
2015-12-10 18:51:42 +03:00
|
|
|
|
2019-11-22 16:30:57 +03:00
|
|
|
include ':annotations', ':messaging_example', ':port_messaging_example'
|
2016-10-06 06:23:38 +03:00
|
|
|
include ':geckoview'
|
2022-01-11 22:16:02 +03:00
|
|
|
include ':exoplayer2'
|
2023-12-15 12:19:16 +03:00
|
|
|
include ':mozilla-lint-rules'
|
2024-11-06 20:36:23 +03:00
|
|
|
include ':android-components'
|
2015-10-22 01:07:55 +03:00
|
|
|
|
2023-12-08 00:19:37 +03: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-08 00:19:43 +03:00
|
|
|
project(':android-components').projectDir = new File("${gradle.mozconfig.topsrcdir}/mobile/android/android-components")
|
2024-11-06 20:36:23 +03: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-22 01:07:55 +03:00
|
|
|
|
2022-11-18 03:55:03 +03:00
|
|
|
if (hasProperty("androidFormatLintTest")) {
|
|
|
|
include ':androidFormatLintTest'
|
2023-12-08 00:19:37 +03:00
|
|
|
project(':androidFormatLintTest').projectDir = new File("${gradle.mozconfig.topsrcdir}/tools/lint/test/files/android-format")
|
2022-11-18 03:55:03 +03:00
|
|
|
}
|
|
|
|
|
2019-11-22 16:30:57 +03:00
|
|
|
project(':messaging_example').projectDir = new File('mobile/android/examples/messaging_example/app')
|
2021-09-29 20:54:57 +03:00
|
|
|
project(':port_messaging_example').projectDir = new File('mobile/android/examples/port_messaging_example/app')
|