diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84c9fc6..31011d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,18 +19,18 @@ jobs: steps: - name: Check out - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: 'recursive' fetch-depth: 0 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' cache: 'gradle' - name: Cache Gradle Build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches/build-cache-* @@ -55,7 +55,7 @@ jobs: ORG_GRADLE_PROJECT_signingKey: ${{ secrets.maven_pgp_signingKey }} ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.maven_pgp_signingPassword }} - name: Upload library - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.os }}-library path: ~/.m2 @@ -63,7 +63,7 @@ jobs: test: needs: build name: Test on API ${{ matrix.api-level }} ${{ matrix.arch }} - runs-on: macos-latest + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -135,10 +135,13 @@ jobs: target: android-tv arch: x86 - api-level: 32 - target: google_apis + target: aosp_atd arch: x86_64 - api-level: 33 - target: google_apis + target: aosp_atd + arch: x86_64 + - api-level: 34 + target: aosp_atd arch: x86_64 steps: - name: checkout @@ -146,13 +149,13 @@ jobs: with: submodules: 'recursive' - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' cache: 'gradle' - name: Cache Gradle Build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches/build-cache-* @@ -166,6 +169,11 @@ jobs: key: ${{ runner.os }}-${{ github.sha }} restore-keys: ${{ runner.os }} save: false + - name: Enable KVM group perms + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - name: run tests uses: reactivecircus/android-emulator-runner@v2 with: @@ -183,7 +191,7 @@ jobs: avd-name: ${{ matrix.api-level }}_${{ matrix.arch }} - name: Upload outputs if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: test-outputs + name: ${{ matrix.api-level }}-${{ matrix.arch }}-test-outputs path: test/build/outputs diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0e5e09d..609f9cd 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -9,15 +9,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: 'recursive' fetch-depth: 0 - - name: Set up JDK 11 - uses: actions/setup-java@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v4 with: - distribution: 'zulu' - java-version: '11' + distribution: 'temurin' + java-version: '17' cache: 'gradle' - name: Build with Gradle run: ./gradlew :lsplt:publish diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index f85a341..1bfe964 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: 'recursive' - name: Install doxygen @@ -37,7 +37,7 @@ jobs: - name: Generate doxygen run: doxygen docs/doxygen.cfg - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: # Upload entire repository path: 'docs/docs' diff --git a/build.gradle.kts b/build.gradle.kts index bbc2021..a12448d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ -val androidTargetSdkVersion by extra(33) +val androidTargetSdkVersion by extra(34) val androidMinSdkVersion by extra(21) -val androidBuildToolsVersion by extra("33.0.1") -val androidCompileSdkVersion by extra(33) -val androidNdkVersion by extra("25.1.8937393") +val androidBuildToolsVersion by extra("34.0.0") +val androidCompileSdkVersion by extra(34) +val androidNdkVersion by extra("26.2.11394342") val androidCmakeVersion by extra("3.22.1+") diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cb..d64cd49 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bdc9a83..a80b22c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 93e3f59..25da30d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/lsplt/build.gradle.kts b/lsplt/build.gradle.kts index fc63f3a..dceedca 100644 --- a/lsplt/build.gradle.kts +++ b/lsplt/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { mavenCentral() } dependencies { - classpath("org.eclipse.jgit:org.eclipse.jgit:6.4.0.202211300538-r") + classpath("org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r") } } @@ -46,7 +46,7 @@ android { prefab = true } - packagingOptions { + packaging { jniLibs { excludes += "**.so" } @@ -63,6 +63,11 @@ android { targetSdk = androidTargetSdkVersion } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + buildTypes { all { externalNativeBuild { diff --git a/settings.gradle.kts b/settings.gradle.kts index a3c0b5f..7379c49 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,8 +5,8 @@ pluginManagement { mavenCentral() } plugins { - id("com.android.application") version "7.4.2" - id("com.android.library") version "7.4.2" + id("com.android.application") version "8.2.2" + id("com.android.library") version "8.2.2" } } dependencyResolutionManagement { diff --git a/test/build.gradle.kts b/test/build.gradle.kts index fd49420..475e871 100644 --- a/test/build.gradle.kts +++ b/test/build.gradle.kts @@ -45,8 +45,8 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } testOptions { @@ -81,8 +81,9 @@ android { createDevice(30, true) // createDevice(31, false, "android-tv") createDevice(31, true, "aosp_atd") - createDevice(32, true, "google_apis") - createDevice(33, true, "google_apis") + createDevice(32, true, "aosp_atd") + createDevice(33, true, "aosp_atd") + createDevice(34, true, "aosp_atd") } } }