You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Update Android dependencies for the project
- Update Android gradle plugin version from 7.2.1 to 8.2.0 - Update gradle version from 7.4.2 to 8.2 - Update target SDK from 33 to 34 - Update build tools version from 33.0.2 to 34.0.0 - Update kotlin version from 1.7.0 to 1.9.20 - Update Android fragment version from 1.3.6 to 1.6.2 - Update AndroidX window version from 1.0.0 to 1.2.0
This commit is contained in:
@@ -255,7 +255,7 @@ static const char *AAB_ASSETS_DIRECTORY = "res://android/build/assetPacks/instal
|
|||||||
|
|
||||||
static const int OPENGL_MIN_SDK_VERSION = 21; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
|
static const int OPENGL_MIN_SDK_VERSION = 21; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
|
||||||
static const int VULKAN_MIN_SDK_VERSION = 24;
|
static const int VULKAN_MIN_SDK_VERSION = 24;
|
||||||
static const int DEFAULT_TARGET_SDK_VERSION = 33; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
|
static const int DEFAULT_TARGET_SDK_VERSION = 34; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
|
||||||
|
|
||||||
#ifndef ANDROID_ENABLED
|
#ifndef ANDROID_ENABLED
|
||||||
void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) {
|
void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.godot.game"
|
|
||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="1.0"
|
android:versionName="1.0"
|
||||||
android:installLocation="auto" >
|
android:installLocation="auto" >
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
apply plugin: 'com.android.asset-pack'
|
plugins {
|
||||||
|
id 'com.android.asset-pack'
|
||||||
|
}
|
||||||
|
|
||||||
assetPack {
|
assetPack {
|
||||||
packName = "installTime" // Directory name for the asset pack
|
packName = "installTime" // Directory name for the asset pack
|
||||||
|
|||||||
@@ -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 "androidx.fragment:fragment:$versions.fragmentVersion"
|
||||||
implementation libraries.androidxFragment
|
|
||||||
|
|
||||||
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"))
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
ext.versions = [
|
ext.versions = [
|
||||||
androidGradlePlugin: '7.2.1',
|
androidGradlePlugin: '8.2.0',
|
||||||
compileSdk : 33,
|
compileSdk : 34,
|
||||||
// Also update 'platform/android/export/export_plugin.cpp#OPENGL_MIN_SDK_VERSION'
|
// Also update 'platform/android/export/export_plugin.cpp#OPENGL_MIN_SDK_VERSION'
|
||||||
minSdk : 21,
|
minSdk : 21,
|
||||||
// Also update 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION'
|
// Also update 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION'
|
||||||
targetSdk : 33,
|
targetSdk : 34,
|
||||||
buildTools : '33.0.2',
|
buildTools : '34.0.0',
|
||||||
kotlinVersion : '1.7.0',
|
kotlinVersion : '1.9.20',
|
||||||
fragmentVersion : '1.3.6',
|
fragmentVersion : '1.6.2',
|
||||||
nexusPublishVersion: '1.1.0',
|
nexusPublishVersion: '1.3.0',
|
||||||
javaVersion : JavaVersion.VERSION_17,
|
javaVersion : JavaVersion.VERSION_17,
|
||||||
// Also update 'platform/android/detect.py#get_ndk_version()' when this is updated.
|
// Also update 'platform/android/detect.py#get_ndk_version()' when this is updated.
|
||||||
ndkVersion : '23.2.8568313'
|
ndkVersion : '23.2.8568313'
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
ext.libraries = [
|
|
||||||
androidGradlePlugin: "com.android.tools.build:gradle:$versions.androidGradlePlugin",
|
|
||||||
kotlinGradlePlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlinVersion",
|
|
||||||
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlinVersion",
|
|
||||||
androidxFragment : "androidx.fragment:fragment:$versions.fragmentVersion",
|
|
||||||
]
|
|
||||||
|
|
||||||
ext.getExportPackageName = { ->
|
ext.getExportPackageName = { ->
|
||||||
// Retrieve the app id from the project property set by the Godot build command.
|
// Retrieve the app id from the project property set by the Godot build command.
|
||||||
String appId = project.hasProperty("export_package_name") ? project.property("export_package_name") : ""
|
String appId = project.hasProperty("export_package_name") ? project.property("export_package_name") : ""
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ pluginManagement {
|
|||||||
id 'org.jetbrains.kotlin.android' version versions.kotlinVersion
|
id 'org.jetbrains.kotlin.android' version versions.kotlinVersion
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
|
||||||
google()
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
buildscript {
|
|
||||||
apply from: 'app/config.gradle'
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
maven { url "https://plugins.gradle.org/m2/" }
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath libraries.androidGradlePlugin
|
|
||||||
classpath libraries.kotlinGradlePlugin
|
|
||||||
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'io.github.gradle-nexus.publish-plugin'
|
id 'io.github.gradle-nexus.publish-plugin'
|
||||||
}
|
}
|
||||||
@@ -31,6 +16,8 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,7 +290,7 @@ task generateGodotTemplates {
|
|||||||
*/
|
*/
|
||||||
task generateDevTemplate {
|
task generateDevTemplate {
|
||||||
// add parameter to set symbols to true
|
// add parameter to set symbols to true
|
||||||
gradle.startParameter.projectProperties += [doNotStrip: true]
|
gradle.startParameter.projectProperties += [doNotStrip: "true"]
|
||||||
|
|
||||||
gradle.startParameter.excludedTaskNames += templateExcludedBuildTask()
|
gradle.startParameter.excludedTaskNames += templateExcludedBuildTask()
|
||||||
dependsOn = templateBuildTasks()
|
dependsOn = templateBuildTasks()
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'org.jetbrains.kotlin.android'
|
id 'org.jetbrains.kotlin.android'
|
||||||
|
id 'base'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation libraries.kotlinStdLib
|
implementation "androidx.fragment:fragment:$versions.fragmentVersion"
|
||||||
implementation libraries.androidxFragment
|
|
||||||
implementation project(":lib")
|
implementation project(":lib")
|
||||||
|
|
||||||
implementation "androidx.window:window:1.0.0"
|
implementation "androidx.window:window:1.2.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
@@ -81,6 +81,8 @@ android {
|
|||||||
buildToolsVersion versions.buildTools
|
buildToolsVersion versions.buildTools
|
||||||
ndkVersion versions.ndkVersion
|
ndkVersion versions.ndkVersion
|
||||||
|
|
||||||
|
namespace = "org.godotengine.editor"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// The 'applicationId' suffix allows to install Godot 3.x(v3) and 4.x(v4) on the same device
|
// The 'applicationId' suffix allows to install Godot 3.x(v3) and 4.x(v4) on the same device
|
||||||
applicationId "org.godotengine.editor.v4"
|
applicationId "org.godotengine.editor.v4"
|
||||||
@@ -90,7 +92,10 @@ android {
|
|||||||
targetSdkVersion versions.targetSdk
|
targetSdkVersion versions.targetSdk
|
||||||
|
|
||||||
missingDimensionStrategy 'products', 'editor'
|
missingDimensionStrategy 'products', 'editor'
|
||||||
setProperty("archivesBaseName", "android_editor")
|
}
|
||||||
|
|
||||||
|
base {
|
||||||
|
archivesName = "android_editor"
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
@@ -111,6 +116,10 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
dev {
|
dev {
|
||||||
initWith debug
|
initWith debug
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="org.godotengine.editor"
|
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|
||||||
<supports-screens
|
<supports-screens
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
#Wed Jan 17 12:08:26 PST 2024
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.godotengine.godot"
|
|
||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="1.0">
|
android:versionName="1.0">
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ ext {
|
|||||||
apply from: "../scripts/publish-module.gradle"
|
apply from: "../scripts/publish-module.gradle"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation libraries.kotlinStdLib
|
implementation "androidx.fragment:fragment:$versions.fragmentVersion"
|
||||||
implementation libraries.androidxFragment
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def pathToRootDir = "../../../../"
|
def pathToRootDir = "../../../../"
|
||||||
@@ -39,6 +38,11 @@ android {
|
|||||||
jvmTarget = versions.javaVersion
|
jvmTarget = versions.javaVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
aidl = true
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
dev {
|
dev {
|
||||||
initWith debug
|
initWith debug
|
||||||
|
|||||||
@@ -210,21 +210,23 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onScroll(
|
override fun onScroll(
|
||||||
originEvent: MotionEvent,
|
originEvent: MotionEvent?,
|
||||||
terminusEvent: MotionEvent,
|
terminusEvent: MotionEvent,
|
||||||
distanceX: Float,
|
distanceX: Float,
|
||||||
distanceY: Float
|
distanceY: Float
|
||||||
): Boolean {
|
): Boolean {
|
||||||
if (scaleInProgress) {
|
if (scaleInProgress) {
|
||||||
if (dragInProgress) {
|
if (dragInProgress) {
|
||||||
// Cancel the drag
|
if (originEvent != null) {
|
||||||
GodotInputHandler.handleMotionEvent(
|
// Cancel the drag
|
||||||
originEvent.source,
|
GodotInputHandler.handleMotionEvent(
|
||||||
MotionEvent.ACTION_CANCEL,
|
originEvent.source,
|
||||||
originEvent.buttonState,
|
MotionEvent.ACTION_CANCEL,
|
||||||
originEvent.x,
|
originEvent.buttonState,
|
||||||
originEvent.y
|
originEvent.x,
|
||||||
)
|
originEvent.y
|
||||||
|
)
|
||||||
|
}
|
||||||
dragInProgress = false
|
dragInProgress = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest package="org.godotengine.godot" />
|
<manifest />
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ android {
|
|||||||
buildToolsVersion versions.buildTools
|
buildToolsVersion versions.buildTools
|
||||||
ndkVersion versions.ndkVersion
|
ndkVersion versions.ndkVersion
|
||||||
|
|
||||||
|
namespace = "org.godotengine.godot"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion versions.minSdk
|
minSdkVersion versions.minSdk
|
||||||
targetSdkVersion versions.targetSdk
|
targetSdkVersion versions.targetSdk
|
||||||
|
|||||||
@@ -5,12 +5,15 @@ pluginManagement {
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application' version versions.androidGradlePlugin
|
id 'com.android.application' version versions.androidGradlePlugin
|
||||||
id 'com.android.library' version versions.androidGradlePlugin
|
id 'com.android.library' version versions.androidGradlePlugin
|
||||||
|
id 'com.android.asset-pack' version versions.androidGradlePlugin
|
||||||
id 'org.jetbrains.kotlin.android' version versions.kotlinVersion
|
id 'org.jetbrains.kotlin.android' version versions.kotlinVersion
|
||||||
id 'io.github.gradle-nexus.publish-plugin' version versions.nexusPublishVersion
|
id 'io.github.gradle-nexus.publish-plugin' version versions.nexusPublishVersion
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
|
||||||
google()
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user