diff --git a/src/frontends/android/app/build.gradle b/src/frontends/android/app/build.gradle index 33569f1c3..35ecdcbb9 100644 --- a/src/frontends/android/app/build.gradle +++ b/src/frontends/android/app/build.gradle @@ -1,39 +1,36 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 33 - namespace 'org.strongswan.android' defaultConfig { applicationId "org.strongswan.android" + compileSdk 34 minSdkVersion 21 targetSdkVersion 33 versionCode 80 versionName "2.4.2" + + externalNativeBuild { + ndkBuild { + arguments '-j' + Runtime.runtime.availableProcessors() + } + } } - sourceSets.main { - jniLibs.srcDir 'src/main/libs' + ndkVersion "26.1.10909125" + + externalNativeBuild { + ndkBuild { + path 'src/main/jni/Android.mk' + } } - task buildNative(type: Exec) { - workingDir 'src/main/jni' - commandLine "${android.ndkDirectory}/ndk-build", '-j', Runtime.runtime.availableProcessors() + tasks.withType(JavaCompile).configureEach { + compileTask -> + options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } - task cleanNative(type: Exec) { - workingDir 'src/main/jni' - commandLine "${android.ndkDirectory}/ndk-build", 'clean' - } - - tasks.withType(JavaCompile) { - compileTask -> compileTask.dependsOn buildNative - options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" - } - - clean.dependsOn 'cleanNative' - buildTypes { release { minifyEnabled false @@ -47,10 +44,10 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.4.2' - implementation 'androidx.preference:preference:1.2.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'com.google.android.material:material:1.6.1' + implementation 'com.google.android.material:material:1.10.0' testImplementation 'junit:junit:4.13.2' testImplementation 'org.mockito:mockito-core:3.11.2' testImplementation 'org.powermock:powermock-core:2.0.9' diff --git a/src/frontends/android/build.gradle b/src/frontends/android/build.gradle index dc4fab06b..2b505ba48 100644 --- a/src/frontends/android/build.gradle +++ b/src/frontends/android/build.gradle @@ -4,7 +4,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:8.2.0' } } diff --git a/src/frontends/android/gradle.properties b/src/frontends/android/gradle.properties index 5465fec0e..f8b6780ad 100644 --- a/src/frontends/android/gradle.properties +++ b/src/frontends/android/gradle.properties @@ -1,2 +1,4 @@ -android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file +android.enableJetifier=false +android.nonFinalResIds=false +android.nonTransitiveRClass=false +android.useAndroidX=true diff --git a/src/frontends/android/gradle/wrapper/gradle-wrapper.properties b/src/frontends/android/gradle/wrapper/gradle-wrapper.properties index 5cabee55d..d219d263c 100644 --- a/src/frontends/android/gradle/wrapper/gradle-wrapper.properties +++ b/src/frontends/android/gradle/wrapper/gradle-wrapper.properties @@ -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-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip