mirror of
https://github.com/signalapp/libsignal.git
synced 2024-09-20 03:52:17 +02:00
Java: Update to Gradle 8.4, Android Gradle Plugin 8.3, SDK 34, Java 17
Each of these updates is required for the following update, and the final one allows us to use 'record'. The target SDK version is set to 33, matching the Android app.
This commit is contained in:
parent
560cc9af8c
commit
f896129db9
2
.github/workflows/build_and_test.yml
vendored
2
.github/workflows/build_and_test.yml
vendored
@ -245,6 +245,8 @@ jobs:
|
||||
if: ${{ needs.changes.outputs.java == 'true' }}
|
||||
|
||||
steps:
|
||||
- run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> "$GITHUB_ENV"
|
||||
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
# Download all commits so we can search for the merge base with origin/main.
|
||||
|
2
.github/workflows/slow_tests.yml
vendored
2
.github/workflows/slow_tests.yml
vendored
@ -51,7 +51,7 @@ jobs:
|
||||
arch: [x86, x86_64]
|
||||
|
||||
steps:
|
||||
- run: 'echo "JAVA_HOME=$JAVA_HOME_11_X64" >> "$GITHUB_ENV"'
|
||||
- run: 'echo "JAVA_HOME=$JAVA_HOME_17_X64" >> "$GITHUB_ENV"'
|
||||
|
||||
# For hardware acceleration; see https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/
|
||||
- name: Enable KVM group perms
|
||||
|
@ -19,7 +19,7 @@ RUN apt-get update
|
||||
|
||||
# Install only what's needed to set up Rust and Android
|
||||
# We'll install additional tools at the end to take advantage of Docker's caching of earlier steps.
|
||||
RUN apt-get install -y curl openjdk-11-jdk-headless unzip
|
||||
RUN apt-get install -y curl openjdk-17-jdk-headless unzip
|
||||
|
||||
ARG UID
|
||||
ARG GID
|
||||
@ -38,8 +38,8 @@ WORKDIR /home/libsignal
|
||||
# Android SDK setup...
|
||||
ARG ANDROID_SDK_FILENAME=commandlinetools-linux-7583922_latest.zip
|
||||
ARG ANDROID_SDK_SHA=124f2d5115eee365df6cf3228ffbca6fc3911d16f8025bebd5b1c6e2fcfa7faf
|
||||
ARG ANDROID_API_LEVELS=android-30
|
||||
ARG ANDROID_BUILD_TOOLS_VERSION=30.0.2
|
||||
ARG ANDROID_API_LEVELS=android-34
|
||||
ARG ANDROID_BUILD_TOOLS_VERSION=34.0.0
|
||||
ARG NDK_VERSION=25.2.9519653
|
||||
ENV ANDROID_HOME /home/libsignal/android-sdk
|
||||
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/cmdline-tools/bin
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'com.android.library' version '7.0.0'
|
||||
id 'com.android.library' version '8.3.0'
|
||||
id 'androidx.benchmark' version '1.1.1'
|
||||
}
|
||||
|
||||
@ -10,11 +10,11 @@ repositories {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 33
|
||||
multiDexEnabled true
|
||||
|
||||
// Uncomment this to build 32-bit-only benchmarks.
|
||||
@ -29,8 +29,8 @@ android {
|
||||
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
namespace "org.signal.libsignal.benchmarks"
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'com.android.library' version '7.0.0'
|
||||
id 'com.android.library' version '8.3.0'
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
}
|
||||
@ -13,21 +13,22 @@ repositories {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion '30.0.2'
|
||||
namespace 'org.signal.libsignal'
|
||||
|
||||
compileSdk 34
|
||||
ndkVersion '25.2.9519653'
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 33
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@ -48,6 +49,10 @@ android {
|
||||
pickFirst 'lib/*/libsignal_jni.so'
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
singleVariant('release')
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@ -59,7 +64,7 @@ dependencies {
|
||||
|
||||
tasks.register('libsWithDebugSymbols', Zip) {
|
||||
from 'src/main/jniLibs'
|
||||
classifier 'debug-symbols'
|
||||
archiveClassifier = 'debug-symbols'
|
||||
dependsOn 'makeJniLibraries'
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.signal.libsignal">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
</manifest>
|
||||
|
@ -69,8 +69,8 @@ def current_origin_main_entry():
|
||||
our_abs_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
lib_size = os.path.getsize(os.path.join(
|
||||
our_abs_dir, 'android', 'build', 'intermediates', 'stripped_native_libs', 'release', 'out',
|
||||
'lib', 'arm64-v8a', 'libsignal_jni.so'))
|
||||
our_abs_dir, 'android', 'build', 'intermediates', 'stripped_native_libs', 'release', 'stripReleaseDebugSymbols',
|
||||
'out', 'lib', 'arm64-v8a', 'libsignal_jni.so'))
|
||||
|
||||
with open(os.path.join(our_abs_dir, 'code_size.json')) as old_sizes_file:
|
||||
old_sizes = json.load(old_sizes_file)
|
||||
|
@ -4,7 +4,7 @@ plugins {
|
||||
id 'signing'
|
||||
}
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
sourceCompatibility = 17
|
||||
archivesBaseName = "libsignal-client"
|
||||
|
||||
repositories {
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Note: Check https://gradle.org/release-checksums/ before updating wrapper or distribution
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=8cc27038d5dbd815759851ba53e70cf62e481b87494cc97cfd97982ada5ba634
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -4,7 +4,7 @@ plugins {
|
||||
id 'signing'
|
||||
}
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
sourceCompatibility = 17
|
||||
archivesBaseName = "libsignal-server"
|
||||
|
||||
repositories {
|
||||
|
Loading…
Reference in New Issue
Block a user