diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 783f2ff9..7c04de60 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -9,10 +9,11 @@ jobs: steps: - uses: actions/checkout@v1 - - name: set up JDK 1.11 - uses: actions/setup-java@v1 + - name: set up JDK 21 + uses: actions/setup-java@v4 with: - java-version: 1.11 + distribution: 'oracle' + java-version: '21' - name: install libusb run: wget https://github.com/libusb/libusb/archive/v1.0.26.zip && unzip v1.0.26.zip - name: write local properties diff --git a/androidtests/build.gradle b/androidtests/build.gradle index 83f92218..2ecb4052 100644 --- a/androidtests/build.gradle +++ b/androidtests/build.gradle @@ -2,13 +2,19 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 32 - buildToolsVersion "30.0.3" + kotlinOptions { + jvmTarget = '21' + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 + } defaultConfig { testInstrumentationRunnerArguments minSdkVersion 15 - targetSdkVersion 32 + targetSdkVersion 33 + compileSdk 33 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments.package = 'me.jahnen.libaums.androidtests' diff --git a/app/build.gradle b/app/build.gradle index a9be017e..5ab28d43 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,14 +1,20 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -android { - compileSdkVersion 33 - buildToolsVersion '30.0.3' +android { + kotlinOptions { + jvmTarget = '21' + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 + } defaultConfig { applicationId "com.github.mjdev.usbfileman" minSdkVersion 16 targetSdkVersion 33 + compileSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true diff --git a/build.gradle b/build.gradle index e4cb3ae2..64e93a32 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,14 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.8.0' + ext.kotlin_version = '2.0.20' repositories { mavenCentral() maven { url "https://plugins.gradle.org/m2/" } google() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.7.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' @@ -16,8 +16,8 @@ buildscript { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.8.10" - classpath "org.jacoco:org.jacoco.core:0.8.8" - classpath 'com.dicedmelon.gradle:jacoco-android:0.1.5' + classpath "org.jacoco:org.jacoco.core:0.8.11" + classpath 'com.mxalbert.gradle.jacoco-android:com.mxalbert.gradle.jacoco-android.gradle.plugin:0.2.1' classpath 'io.github.gradle-nexus:publish-plugin:1.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle.properties b/gradle.properties index 31875e28..d69abf39 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,10 @@ # 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 +android.defaults.buildfeatures.buildconfig=true android.enableJetifier=true +android.nonFinalResIds=false +android.nonTransitiveRClass=false android.useAndroidX=true org.gradle.jvmargs=-Xmx4096M \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 20ecac2b..ab749131 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Nov 22 10:59:55 CET 2022 +#Tue Nov 05 15:02:06 CET 2024 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/httpserver/build.gradle b/httpserver/build.gradle index 92f36728..2a12c295 100644 --- a/httpserver/build.gradle +++ b/httpserver/build.gradle @@ -17,12 +17,18 @@ configurations { } android { - compileSdkVersion 32 - buildToolsVersion '30.0.3' + kotlinOptions { + jvmTarget = '21' + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 + } defaultConfig { minSdkVersion 16 - targetSdkVersion 32 + targetSdkVersion 33 + compileSdk 33 } buildTypes { release { @@ -48,7 +54,7 @@ dependencies { api 'androidx.core:core:1.2.0-rc01' api project(':libaums') api "androidx.core:core-ktx:1.1.0" - api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" } repositories { diff --git a/javafs/build.gradle b/javafs/build.gradle index 9c8f239f..e144db0b 100644 --- a/javafs/build.gradle +++ b/javafs/build.gradle @@ -1,12 +1,11 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 32 - buildToolsVersion '30.0.3' defaultConfig { minSdkVersion 15 - targetSdkVersion 32 + targetSdkVersion 33 + compileSdk 33 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -21,6 +20,7 @@ android { abortOnError false } namespace 'me.jahnen.libaums.javafs' + compileSdk 34 } dependencies { diff --git a/libaums/build.gradle b/libaums/build.gradle index 3cc63eea..41a17ff3 100644 --- a/libaums/build.gradle +++ b/libaums/build.gradle @@ -1,10 +1,10 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'org.jetbrains.dokka' -apply plugin: 'com.dicedmelon.gradle.jacoco-android' +apply plugin: 'com.mxalbert.gradle.jacoco-android' jacoco { - toolVersion = "0.8.7" + toolVersion = "0.8.11" } ext { @@ -20,12 +20,18 @@ configurations { } android { - compileSdkVersion 33 - buildToolsVersion '30.0.3' + kotlinOptions { + jvmTarget = '21' + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 + } defaultConfig { minSdkVersion 15 targetSdkVersion 33 + compileSdk 33 externalNativeBuild { cmake { @@ -38,10 +44,11 @@ android { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } - debug { - testCoverageEnabled true + enableUnitTestCoverage true + enableAndroidTestCoverage true } + } diff --git a/libusbcommunication/build.gradle b/libusbcommunication/build.gradle index 7b958f07..33deb442 100644 --- a/libusbcommunication/build.gradle +++ b/libusbcommunication/build.gradle @@ -15,11 +15,18 @@ ext { apply from: "${rootProject.projectDir}/publish-module.gradle" android { - compileSdkVersion 33 + kotlinOptions { + jvmTarget = '21' + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 + } defaultConfig { minSdkVersion 15 targetSdkVersion 33 + compileSdk 33 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' diff --git a/publish-module.gradle b/publish-module.gradle index 75ea37f6..44644f18 100644 --- a/publish-module.gradle +++ b/publish-module.gradle @@ -45,7 +45,7 @@ afterEvaluate { // Two artifacts, the `aar` (or `jar`) and the sources if (project.plugins.findPlugin("com.android.library")) { - from components.release + from components.findByName("android") ?: components.findByName("release") } else { from components.java } diff --git a/storageprovider/build.gradle b/storageprovider/build.gradle index e954ab81..58bdfdd9 100644 --- a/storageprovider/build.gradle +++ b/storageprovider/build.gradle @@ -16,12 +16,11 @@ configurations { } android { - compileSdkVersion 32 - buildToolsVersion '30.0.3' defaultConfig { minSdkVersion 16 - targetSdkVersion 32 + targetSdkVersion 33 + compileSdk 33 } buildTypes { release { diff --git a/storageprovider/src/main/AndroidManifest.xml b/storageprovider/src/main/AndroidManifest.xml index c511ceb7..e84d0841 100644 --- a/storageprovider/src/main/AndroidManifest.xml +++ b/storageprovider/src/main/AndroidManifest.xml @@ -7,7 +7,7 @@