Skip to content

Commit

Permalink
Merge branch 'Android33' into notary-test
Browse files Browse the repository at this point in the history
  • Loading branch information
Shchvova committed Aug 5, 2023
2 parents cafcc71 + 33aff91 commit 7de646b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
8 changes: 4 additions & 4 deletions platform/android/Rtt_AndroidAppPackager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ AndroidAppPackager::Build( AppPackagerParams * params, const char * tmpDirBase )
gradleGo.append(" && cd template &&");

#if defined(Rtt_MAC_ENV) || defined(Rtt_LINUX_ENV)
bool java8Installed = 0 == system("JAVA_VERSION=1.8 /usr/bin/java -version > /dev/null 2>/dev/null");
if(java8Installed) {
gradleGo.append(" ./setup.sh && JAVA_VERSION=1.8 ./gradlew");
bool java11Installed = 0 == system("JAVA_VERSION=11 /usr/bin/java -version > /dev/null 2>/dev/null");
if(java11Installed) {
gradleGo.append(" ./setup.sh && JAVA_VERSION=11 ./gradlew");
} else {
Rtt_TRACE_SIM(("WARNING: Java 1.8 does not seems to be available. If build fails, install Java 1.8."));
Rtt_TRACE_SIM(("WARNING: Java 11 does not seems to be available. If build fails, install Java 1.11."));
gradleGo.append(" ./setup.sh && ./gradlew");
}
#else
Expand Down
12 changes: 5 additions & 7 deletions platform/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import com.android.build.api.dsl.Lint
import com.android.build.api.dsl.LintOptions
import com.android.ide.common.util.toPathString
import com.beust.klaxon.JsonArray
import com.beust.klaxon.JsonObject
Expand Down Expand Up @@ -67,7 +65,7 @@ fun checkCoronaNativeInstallation() {
} else {
val setupNativeApp = File("/Applications").listFiles { f ->
f.isDirectory && f.name.startsWith("Corona")
}?.max()?.let {
}.maxOrNull()?.let {
"${it.absolutePath}/Native/Setup Corona Native.app"
} ?: "Native/Setup Corona Native.app"
throw InvalidUserDataException("Corona Native was not set-up properly. Launch '$setupNativeApp'.")
Expand Down Expand Up @@ -191,8 +189,8 @@ if (configureCoronaPlugins == "YES") {
//</editor-fold>

android {
fun Lint.() {
isCheckReleaseBuilds = false
lintOptions {
isCheckReleaseBuilds = true
}
compileSdk = 33
defaultConfig {
Expand All @@ -204,8 +202,8 @@ android {
multiDexEnabled = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
coronaKeystore?.let { keystore ->
signingConfigs {
Expand Down
4 changes: 2 additions & 2 deletions platform/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ buildscript {
jcenter()
}
dependencies {
classpath(kotlin("gradle-plugin", version = "1.3.70"))
classpath("com.android.tools.build:gradle:7.0.4")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
classpath("com.android.tools.build:gradle:7.4.2")
classpath("com.beust:klaxon:5.0.1")
}
}
Expand Down
3 changes: 1 addition & 2 deletions platform/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ org.gradle.jvmargs=-Xmx1280m

# Migrate To Android X
android.useAndroidX=true
android.enableJetifier=true
android.enableResourceOptimizations=false
android.enableJetifier=true
3 changes: 2 additions & 1 deletion platform/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Mon Jul 24 23:10:14 CDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions platform/android/sdk/CMakeGenLua.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

if( CMAKE_BUILD_TYPE STREQUAL "Release" )
if( CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
set(BUILD_CONFIG RELEASE)
elseif( CMAKE_BUILD_TYPE STREQUAL "Debug" )
set(BUILD_CONFIG DEBUG)
Expand Down Expand Up @@ -70,4 +70,4 @@ elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")

else()
message(FATAL_ERROR "CMakeGenLua .cmake is not ported to current OS: ${CMAKE_HOST_SYSTEM_NAME}")
endif()
endif()

0 comments on commit 7de646b

Please sign in to comment.