diff --git a/android/.gitignore b/android/.gitignore
index 56cacb3ced2..2abc0401625 100644
--- a/android/.gitignore
+++ b/android/.gitignore
@@ -2,7 +2,7 @@
.cxx/
.externalNativeBuild/
.gradle/
-.idea/*
+.idea/
!/.idea/codeStyles/
!/.idea/inspectionProfiles/
.project/
diff --git a/android/.idea/codeStyles/Project.xml b/android/.idea/codeStyles/Project.xml
index 8d13c04b12c..36d210ea229 100644
--- a/android/.idea/codeStyles/Project.xml
+++ b/android/.idea/codeStyles/Project.xml
@@ -9,6 +9,9 @@
+
+
+
diff --git a/android/.idea/inspectionProfiles/Project_Default.xml b/android/.idea/inspectionProfiles/Project_Default.xml
index 1eb788b1487..23c812cbcc9 100644
--- a/android/.idea/inspectionProfiles/Project_Default.xml
+++ b/android/.idea/inspectionProfiles/Project_Default.xml
@@ -10,7 +10,11 @@
-
+
+
+
+
+
@@ -155,11 +159,21 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 22de0c84364..d0e214720da 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -9,47 +9,49 @@ apply plugin: 'com.android.application'
// Set up Android app project.
android {
- compileSdkVersion 33
+ ndkVersion project.ext.tiNdkVersion
defaultConfig {
applicationId 'com.titanium.test'
- minSdkVersion 21
- targetSdkVersion 33
+ compileSdk 34
+ minSdkVersion 26
+ targetSdkVersion 34
versionCode 1
versionName '1.0'
manifestPlaceholders = project.ext.tiManifestPlaceholders
manifestPlaceholders.put('localApplicationId', applicationId) // Legacy placeholder old AARs sometimes use.
}
- lintOptions {
- checkReleaseBuilds false
- }
sourceSets {
main {
assets.srcDirs = [
- 'src/main/assets',
- "${projectDir}/../titanium/build/outputs/ti-assets"
+ 'src/main/assets',
+ "${projectDir}/../titanium/build/outputs/ti-assets"
]
}
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_11
- targetCompatibility JavaVersion.VERSION_11
+ sourceCompatibility JavaVersion.VERSION_17
+ targetCompatibility JavaVersion.VERSION_17
+ }
+ namespace 'com.titanium.test'
+ lint {
+ checkReleaseBuilds false
}
}
// Checks our Java code against our style guidelines and for common coding mistakes using "checkstyle.xml".
// Will trigger a build failure if any violations have been detected.
// Customize all the Checkstyle tasks
-tasks.withType(Checkstyle) {
+tasks.withType(Checkstyle).configureEach {
// Specify all files that should be checked
classpath = files()
source android.sourceSets.main.java.srcDirs
}
// Execute Checkstyle on all files
-task checkJavaStyle(type: Checkstyle) {
+tasks.register('checkJavaStyle', Checkstyle) {
// include '**/*.java'
}
// Execute Checkstyle on all modified files
-task checkstyleChanged(type: Checkstyle) {
+tasks.register('checkstyleChanged', Checkstyle) {
include getChangedFiles()
}
@@ -73,7 +75,7 @@ def getChangedFiles() {
files
}
-tasks.withType(JavaCompile) {
+tasks.withType(JavaCompile).configureEach {
dependsOn checkJavaStyle
}
diff --git a/android/build.gradle b/android/build.gradle
index 580edafef28..fa34b56b8d3 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -6,17 +6,17 @@
*/
buildscript {
- ext.kotlin_version = '1.8.20'
+ ext.kotlin_version = '1.9.23'
repositories {
google()
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.0.4'
- classpath 'com.google.gms:google-services:4.3.15'
+ classpath 'com.android.tools.build:gradle:8.3.1'
+ classpath 'com.google.gms:google-services:4.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath 'org.codehaus.groovy:groovy-json:3.0.11'
+ classpath 'org.codehaus.groovy:groovy-json:3.0.17'
}
}
@@ -30,7 +30,7 @@ allprojects {
project.apply plugin: 'checkstyle'
checkstyle {
toolVersion = '8.38'
- configFile file("${rootDir}/checkstyle.xml");
+ configFile file("${rootDir}/checkstyle.xml")
ignoreFailures false
showViolations true
}
@@ -39,6 +39,6 @@ allprojects {
project.apply from: "${rootDir}/templates/build/ti.constants.gradle"
}
-task clean(type: Delete) {
- delete rootProject.buildDir
+tasks.register('clean', Delete) {
+ delete project.layout.buildDirectory
}
diff --git a/android/gradle.properties b/android/gradle.properties
index e5e7569a7a5..f2fad85fcc7 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -15,3 +15,6 @@ android.enableJetifier=false
# remove if com.android.tools.build:gradle can be raised in /android/build.gradle
android.suppressUnsupportedCompileSdk=33
+android.defaults.buildfeatures.buildconfig=true
+android.nonTransitiveRClass=false
+android.nonFinalResIds=false
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index e8be595e3c6..83dc05f6cc4 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
+#Tue Mar 19 21:28:34 EET 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/android/kroll-apt/build.gradle b/android/kroll-apt/build.gradle
index 8f5d9d6ddc6..94854133e76 100644
--- a/android/kroll-apt/build.gradle
+++ b/android/kroll-apt/build.gradle
@@ -7,22 +7,24 @@
apply plugin: 'java'
-sourceCompatibility = JavaVersion.VERSION_11
-targetCompatibility = JavaVersion.VERSION_11
+java {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+}
// Checks our Java code against our style guidelines and for common coding mistakes using "checkstyle.xml".
// Will trigger a build failure if any violations have been detected.
// Customize all the Checkstyle tasks
-tasks.withType(Checkstyle) {
+tasks.withType(Checkstyle).configureEach {
// Specify all files that should be checked
classpath = files()
source 'src/main/java'
}
// Execute Checkstyle on all files
-task checkJavaStyle(type: Checkstyle) {
+tasks.register('checkJavaStyle', Checkstyle) {
// include '**/*.java'
}
-task checkstyleChanged(type: Checkstyle) {
+tasks.register('checkstyleChanged', Checkstyle) {
include getChangedFiles()
}
@@ -47,7 +49,7 @@ def getChangedFiles() {
}
// Hook into Java compile task.
-tasks.withType(JavaCompile) {
+tasks.withType(JavaCompile).configureEach {
// Check Java code for mistakes before compiling.
dependsOn checkJavaStyle
@@ -55,6 +57,7 @@ tasks.withType(JavaCompile) {
// building with JDK newer than the Java version we're targeting. (Ex: Build with JDK 8, but target Java 7.)
// Note: Build tool wants a reference to runtime JAR of the same version we're targeting. Not going to happen.
options.compilerArgs << '-Xlint:-options'
+ options.incremental = true
}
// Bundle the below library dependencies within this project's built JAR.
@@ -69,6 +72,7 @@ jar {
}
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
+ version '1.0.0'
}
dependencies {
diff --git a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollJSONGenerator.java b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollJSONGenerator.java
index 58a6ad271cc..2d9eca37598 100644
--- a/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollJSONGenerator.java
+++ b/android/kroll-apt/src/main/java/org/appcelerator/kroll/annotations/generator/KrollJSONGenerator.java
@@ -30,14 +30,14 @@
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
-import javax.lang.model.util.SimpleElementVisitor6;
+import javax.lang.model.util.SimpleElementVisitor9;
import javax.tools.Diagnostic;
import javax.tools.FileObject;
import javax.tools.StandardLocation;
import org.json.simple.JSONValue;
-@SupportedSourceVersion(SourceVersion.RELEASE_11)
+@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SuppressWarnings("unchecked")
@SupportedAnnotationTypes({
KrollJSONGenerator.Kroll_argument,
@@ -214,7 +214,7 @@ protected void initialize()
} catch (Exception e) {
// file doesn't exist, we'll just create it later
debug("No binding data found, creating new data file: %s/%s", this.jarJsonPackageName,
- this.jarJsonFileName);
+ this.jarJsonFileName);
}
}
}
@@ -222,17 +222,18 @@ protected void initialize()
protected void processKrollProxy(final Element element)
{
utils.acceptAnnotations(
- element, new String[] { Kroll_proxy, Kroll_module }, new KrollVisitor() {
- protected Map