mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-21 05:28:08 +00:00
Bumped AGP to 9.0 (must keep using kapt instead of ksp because of databinding) and build using Java 21 + updated docker image
This commit is contained in:
parent
cea47a767b
commit
5391c12473
8 changed files with 70 additions and 9 deletions
|
|
@ -2,7 +2,7 @@ job-android:
|
|||
|
||||
stage: build
|
||||
tags: [ "docker-android" ]
|
||||
image: gitlab.linphone.org:4567/bc/public/linphone-android/bc-dev-android:20230414_bullseye_jdk_17_cleaned
|
||||
image: gitlab.linphone.org:4567/bc/public/linphone-android/bc-dev-android-36:20260120_trixie_java21_android36_gradle9
|
||||
|
||||
before_script:
|
||||
- if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then eval $(ssh-agent -s); fi
|
||||
|
|
|
|||
2
.idea/compiler.xml
generated
2
.idea/compiler.xml
generated
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="17" />
|
||||
<bytecodeTargetLevel target="21" />
|
||||
</component>
|
||||
</project>
|
||||
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="temurin-17" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ android {
|
|||
|
||||
val appVersion = gitVersion
|
||||
val appBranch = gitBranch
|
||||
println("Setting app version [$appVersion] app branch [$appBranch]")
|
||||
println("Debug flavor app version is [$appVersion], app branch is [$appBranch]")
|
||||
resValue("string", "linphone_app_version", appVersion)
|
||||
resValue("string", "linphone_app_branch", appBranch)
|
||||
if (useDifferentPackageNameForDebugBuild) {
|
||||
|
|
@ -181,7 +181,7 @@ android {
|
|||
|
||||
val appVersion = gitVersion
|
||||
val appBranch = gitBranch
|
||||
println("Setting app version [$appVersion] app branch [$appBranch]")
|
||||
println("Release flavor app version is [$appVersion], app branch is [$appBranch]")
|
||||
resValue("string", "linphone_app_version", appVersion)
|
||||
resValue("string", "linphone_app_branch", appBranch)
|
||||
resValue("string", "file_provider", "$packageName.fileprovider")
|
||||
|
|
@ -199,13 +199,14 @@ android {
|
|||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
dataBinding = true
|
||||
buildConfig = true
|
||||
resValues = true
|
||||
}
|
||||
|
||||
lint {
|
||||
|
|
|
|||
55
docker-files/bc-dev-android-36
Normal file
55
docker-files/bc-dev-android-36
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
FROM debian:trixie
|
||||
|
||||
MAINTAINER Sylvain BERFINI <sylvain.berfini@belledonne-communications.com>
|
||||
|
||||
# Configure locale
|
||||
RUN apt-get update && \
|
||||
apt-get install -y locales && \
|
||||
apt-get clean && \
|
||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||
locale-gen
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
|
||||
ENV SHELL=/bin/bash
|
||||
|
||||
# Define environment
|
||||
ENV ANDROID_HOME /opt/android-sdk-linux
|
||||
|
||||
# Install common general tools
|
||||
RUN apt-get update && \
|
||||
apt-get install -y curl nano sudo unzip vim wget rsync ssh git openjdk-21-jdk-headless && \
|
||||
apt-get clean
|
||||
|
||||
# Get latest Android command line tools, otherwise won't work with JDK 21
|
||||
RUN mkdir -p $ANDROID_HOME/cmdline-tools/latest
|
||||
RUN wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip && \
|
||||
unzip commandlinetools-linux-9477386_latest.zip && \
|
||||
cp -R ./cmdline-tools/* $ANDROID_HOME/cmdline-tools/latest/ && \
|
||||
rm -rf ./cmdline-tools && \
|
||||
rm -rf commandlinetools-linux-9477386_latest.zip
|
||||
|
||||
# Update path to include all Android SDK tools
|
||||
ENV PATH $ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH
|
||||
|
||||
# Get the Android SDK
|
||||
RUN echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "tools" "platforms;android-36"
|
||||
|
||||
# Accept Android SDK licenses
|
||||
RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
|
||||
|
||||
# Give write rights
|
||||
RUN chmod -R ugo+rwx $ANDROID_HOME
|
||||
|
||||
# Consider all git repositories as safe
|
||||
RUN git --version
|
||||
RUN git config --global --add safe.directory '*'
|
||||
|
||||
# Configure user bc
|
||||
RUN useradd -ms /bin/bash bc && \
|
||||
echo 'bc:cotcot' | chpasswd && \
|
||||
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
USER bc
|
||||
WORKDIR /home/bc
|
||||
ENV PS1='\[\e[34m\]\u@bc-dev-android>\[\e[0m\] '
|
||||
CMD bash
|
||||
|
|
@ -23,4 +23,8 @@ kotlin.code.style=official
|
|||
android.nonTransitiveRClass=true
|
||||
android.nonFinalResIds=true
|
||||
kapt.use.k2=true
|
||||
|
||||
android.builtInKotlin=false
|
||||
android.newDsl=false
|
||||
|
||||
LinphoneSdkBuildDir=
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
[versions]
|
||||
agp = "8.13.2"
|
||||
agp = "9.0.0"
|
||||
kotlin = "2.3.0"
|
||||
gmsGoogleServices = "4.4.4"
|
||||
firebaseCrashlytics = "3.0.6"
|
||||
firebaseBomVersion = "34.7.0"
|
||||
firebaseBomVersion = "34.8.0"
|
||||
#noinspection NewerVersionAvailable
|
||||
ktlint = "12.3.0"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue