|
@@ -1,17 +1,4 @@
|
|
// Gradle build config for Godot Engine's Android port.
|
|
// Gradle build config for Godot Engine's Android port.
|
|
-buildscript {
|
|
|
|
- apply from: 'config.gradle'
|
|
|
|
-
|
|
|
|
- repositories {
|
|
|
|
- google()
|
|
|
|
- mavenCentral()
|
|
|
|
- }
|
|
|
|
- dependencies {
|
|
|
|
- classpath libraries.androidGradlePlugin
|
|
|
|
- classpath libraries.kotlinGradlePlugin
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
plugins {
|
|
plugins {
|
|
id 'com.android.application'
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
id 'org.jetbrains.kotlin.android'
|
|
@@ -23,6 +10,8 @@ allprojects {
|
|
repositories {
|
|
repositories {
|
|
google()
|
|
google()
|
|
mavenCentral()
|
|
mavenCentral()
|
|
|
|
+ gradlePluginPortal()
|
|
|
|
+ maven { url "https://plugins.gradle.org/m2/" }
|
|
|
|
|
|
// Godot user plugins custom maven repos
|
|
// Godot user plugins custom maven repos
|
|
String[] mavenRepos = getGodotPluginsMavenRepos()
|
|
String[] mavenRepos = getGodotPluginsMavenRepos()
|
|
@@ -42,8 +31,7 @@ configurations {
|
|
}
|
|
}
|
|
|
|
|
|
dependencies {
|
|
dependencies {
|
|
- implementation libraries.kotlinStdLib
|
|
|
|
- implementation libraries.androidxFragment
|
|
|
|
|
|
+ implementation "androidx.fragment:fragment:$versions.fragmentVersion"
|
|
|
|
|
|
if (rootProject.findProject(":lib")) {
|
|
if (rootProject.findProject(":lib")) {
|
|
implementation project(":lib")
|
|
implementation project(":lib")
|
|
@@ -88,6 +76,8 @@ android {
|
|
|
|
|
|
assetPacks = [":assetPacks:installTime"]
|
|
assetPacks = [":assetPacks:installTime"]
|
|
|
|
|
|
|
|
+ namespace = 'com.godot.game'
|
|
|
|
+
|
|
defaultConfig {
|
|
defaultConfig {
|
|
// The default ignore pattern for the 'assets' directory includes hidden files and directories which are used by Godot projects.
|
|
// The default ignore pattern for the 'assets' directory includes hidden files and directories which are used by Godot projects.
|
|
aaptOptions {
|
|
aaptOptions {
|
|
@@ -250,3 +240,17 @@ task validateJavaVersion {
|
|
throw new GradleException("Invalid Java version ${JavaVersion.current()}. Version ${versions.javaVersion} is the required Java version for Godot gradle builds.")
|
|
throw new GradleException("Invalid Java version ${JavaVersion.current()}. Version ${versions.javaVersion} is the required Java version for Godot gradle builds.")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+When they're scheduled to run, the copy*AARToAppModule tasks generate dependencies for the 'app'
|
|
|
|
+module, so we're ensuring the ':app:preBuild' task is set to run after those tasks.
|
|
|
|
+ */
|
|
|
|
+if (rootProject.tasks.findByPath("copyDebugAARToAppModule") != null) {
|
|
|
|
+ preBuild.mustRunAfter(rootProject.tasks.named("copyDebugAARToAppModule"))
|
|
|
|
+}
|
|
|
|
+if (rootProject.tasks.findByPath("copyDevAARToAppModule") != null) {
|
|
|
|
+ preBuild.mustRunAfter(rootProject.tasks.named("copyDevAARToAppModule"))
|
|
|
|
+}
|
|
|
|
+if (rootProject.tasks.findByPath("copyReleaseAARToAppModule") != null) {
|
|
|
|
+ preBuild.mustRunAfter(rootProject.tasks.named("copyReleaseAARToAppModule"))
|
|
|
|
+}
|