Skip to content

Commit

Permalink
Merge pull request #43178 from m4gr3d/update_android_plugins
Browse files Browse the repository at this point in the history
Update android gradle plugins versions
  • Loading branch information
akien-mga authored Oct 29, 2020
2 parents 13e93fe + edf762f commit a4f70d7
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ platform/android/java/lib/.cxx/
platform/android/java/libs/*
platform/android/java/app/libs/*
platform/android/java/lib/.cxx/*
platform/android/java/nativeSrcsConfigs/.cxx/

# General c++ generated files
*.lib
Expand Down
4 changes: 2 additions & 2 deletions platform/android/java/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ android {
buildToolsVersion versions.buildTools

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
sourceCompatibility versions.javaVersion
targetCompatibility versions.javaVersion
}

defaultConfig {
Expand Down
9 changes: 5 additions & 4 deletions platform/android/java/app/config.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
ext.versions = [
androidGradlePlugin: '3.5.3',
androidGradlePlugin: '4.1.0',
compileSdk : 29,
minSdk : 18,
targetSdk : 29,
buildTools : '29.0.3',
buildTools : '30.0.1',
supportCoreUtils : '1.0.0',
kotlinVersion : '1.3.61',
v4Support : '1.0.0'
kotlinVersion : '1.4.10',
v4Support : '1.0.0',
javaVersion : 1.8

]

Expand Down
2 changes: 2 additions & 0 deletions platform/android/java/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

org.gradle.warning.mode=all
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
20 changes: 5 additions & 15 deletions platform/android/java/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ android {
targetSdkVersion versions.targetSdk
}

compileOptions {
sourceCompatibility versions.javaVersion
targetCompatibility versions.javaVersion
}

lintOptions {
abortOnError false
disable 'MissingTranslation', 'UnusedResources'
Expand Down Expand Up @@ -50,15 +55,6 @@ android {

def buildType = variant.buildType.name.capitalize()

def taskPrefix = ""
if (project.path != ":") {
taskPrefix = project.path + ":"
}

// Disable the externalNativeBuild* task as it would cause build failures since the cmake build
// files is only setup for editing support.
gradle.startParameter.excludedTaskNames += taskPrefix + "externalNativeBuild" + buildType

def releaseTarget = buildType.toLowerCase()
if (releaseTarget == null || releaseTarget == "") {
throw new GradleException("Invalid build type: " + buildType)
Expand All @@ -78,10 +74,4 @@ android {
// Schedule the tasks so the generated libs are present before the aar file is packaged.
tasks["merge${buildType}JniLibFolders"].dependsOn taskName
}

externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
2 changes: 2 additions & 0 deletions platform/android/java/nativeSrcsConfigs/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.godotengine.godot" />
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Non functional cmake build file used to provide Android Studio editor support to the project.
cmake_minimum_required(VERSION 3.6)
project(godot)

Expand Down
4 changes: 4 additions & 0 deletions platform/android/java/nativeSrcsConfigs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Native sources configs

This is a non functional Android library used to provide Android Studio editor support to the Godot project native files.
Nothing else should be added to this library.
54 changes: 54 additions & 0 deletions platform/android/java/nativeSrcsConfigs/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Non functional android library used to provide Android Studio editor support to the project.
plugins {
id 'com.android.library'
}

android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools

defaultConfig {
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
}

compileOptions {
sourceCompatibility versions.javaVersion
targetCompatibility versions.javaVersion
}

packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'

// Should be uncommented for development purpose within Android Studio
// doNotStrip '**/*.so'
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
}
}

externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}

libraryVariants.all { variant ->
def buildType = variant.buildType.name.capitalize()

def taskPrefix = ""
if (project.path != ":") {
taskPrefix = project.path + ":"
}

// Disable the externalNativeBuild* task as it would cause build failures since the cmake build
// files is only setup for editing support.
gradle.startParameter.excludedTaskNames += taskPrefix + "externalNativeBuild" + buildType
}
}

dependencies {}
1 change: 1 addition & 0 deletions platform/android/java/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ rootProject.name = "Godot"

include ':app'
include ':lib'
include ':nativeSrcsConfigs'

0 comments on commit a4f70d7

Please sign in to comment.