Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android13 QPR2 Dependency & Misc Updates #526

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,23 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Gradle dependency cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Checkout the code
uses: actions/checkout@v3

- name: Android build cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.android/build-cache
key: ${{ runner.os }}-android
restore-keys: ${{ runner.os }}-android

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'corretto'
java-version: 17
cache: 'gradle'

- name: Build
run: ./gradlew compileDebugAndroidTestSources check assemble ktlintCheck
Expand Down
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "org.jlleitschuh.gradle.ktlint" version "10.2.0"
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jlleitschuh.gradle.ktlint'
}

def gitDescribe = { ->
Expand All @@ -14,12 +14,12 @@ def gitDescribe = { ->
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
namespace 'com.stevesoltys.seedvault'
compileSdk rootProject.ext.compileSdk

defaultConfig {
minSdkVersion 32 // leave at 32 for robolectric tests
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk 32 // leave at 32 for robolectric tests
targetSdk rootProject.ext.targetSdk
versionNameSuffix "-$gitDescribe"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments disableAnalytics: 'true'
Expand All @@ -31,7 +31,7 @@ android {
}
}

lintOptions {
lint {
disable "DialogFragmentCallbacksDetector",
"InvalidFragmentVersionForActivityResult",
"CheckedExceptions"
Expand All @@ -43,7 +43,7 @@ android {
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
languageVersion = "1.6"
languageVersion = "1.7"
}
testOptions {
unitTests.all {
Expand Down
3 changes: 1 addition & 2 deletions app/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.stevesoltys.seedvault">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application android:extractNativeLibs="true" />
</manifest>
41 changes: 16 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,31 @@ buildscript {
// 1.3.61 Android 11
// 1.4.30 Android 12
// 1.6.10 Android 13
theimpulson marked this conversation as resolved.
Show resolved Hide resolved
// 1.7.20 Android 13 (QPR2)
// Check:
// https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-13.0.0_r3/build.txt
ext.aosp_kotlin_version = '1.6.10' // 1.6.10-release-923 in AOSP
ext.kotlin_version = '1.6.10'
// https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-13.0.0_r32/build.txt
ext.aosp_kotlin_version = '1.7.20' // 1.7.20-release-201 in AOSP
ext.kotlin_version = '1.7.20'
}

repositories {
mavenCentral()
google()
}
dependencies {
//noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.17"
classpath 'com.android.tools.build:gradle:7.2.2'
}
plugins {
id 'com.android.application' version '8.1.0' apply false
id 'com.android.library' version '8.1.0' apply false
id 'com.google.protobuf' version '0.9.4' apply false
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
id 'org.jetbrains.kotlin.kapt' version "$kotlin_version" apply false
id 'org.jetbrains.dokka' version "$kotlin_version" apply false
id 'org.jlleitschuh.gradle.ktlint' version '11.5.0' apply false
}

ext {
buildToolsVersion = '33.0.0'
compileSdkVersion = 33
minSdkVersion = 32
targetSdkVersion = 33
compileSdk = 33
minSdk = 32
targetSdk = 33
}

apply from: 'gradle/dependencies.gradle'

allprojects {
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
14 changes: 8 additions & 6 deletions contactsbackup/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
* SPDX-License-Identifier: Apache-2.0
*/

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
namespace 'org.calyxos.backup.contacts'
compileSdk rootProject.ext.compileSdk

defaultConfig {
applicationId "org.calyxos.backup.contacts"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdk

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments disableAnalytics: 'true'
Expand Down
3 changes: 1 addition & 2 deletions contactsbackup/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
SPDX-FileCopyrightText: 2020 The Calyx Institute
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.calyxos.backup.contacts.test">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application android:extractNativeLibs="true" />

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=false
kotlin.code.style=official
android.nonTransitiveRClass=false
android.enableR8.fullMode=false
48 changes: 24 additions & 24 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#3901
ext.room_version = "2.4.0-alpha05"
// https://android.googlesource.com/platform/external/protobuf/+/refs/tags/android-13.0.0_r3/java/pom.xml#7
ext.room_version = "2.4.0-alpha05" // 2.5.0-alpha01 in AOSP but needs testing
// https://android.googlesource.com/platform/external/protobuf/+/refs/tags/android-13.0.0_r32/java/pom.xml#7
ext.protobuf_version = "3.9.1"

// test dependencies below - these do not care about AOSP and can be freely updated
Expand Down Expand Up @@ -39,58 +39,58 @@ ext.kotlin_libs = [
],
coroutines: [
dependencies.create('org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm') {
// https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-13.0.0_r3/CHANGES.md
version { strictly '1.5.2' }
// https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-13.0.0_r32/CHANGES.md
version { strictly '1.6.4' }
},
dependencies.create('org.jetbrains.kotlinx:kotlinx-coroutines-android') {
// https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-13.0.0_r3/CHANGES.md
version { strictly '1.5.2' }
// https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-13.0.0_r32/CHANGES.md
version { strictly '1.6.4' }
},
],
]

ext.std_libs = [
androidx_core: [
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#1761
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#2275
dependencies.create('androidx.core:core') {
version { strictly '1.9.0-alpha03' }
version { strictly '1.9.0-alpha05' } // 1.9.0-alpha03 in AOSP but has SDK version issues
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#1727
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#2241
dependencies.create('androidx.core:core-ktx') {
version { strictly '1.9.0-alpha03' }
version { strictly '1.9.0-alpha05' } // 1.9.0-alpha03 in AOSP but has SDK version issues
},
],
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#2159
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#2705
androidx_fragment: dependencies.create('androidx.fragment:fragment-ktx') {
version { strictly '1.4.0-alpha09' }
version { strictly '1.5.0-alpha03' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#57
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#61
androidx_activity: dependencies.create('androidx.activity:activity-ktx') {
version { strictly '1.4.0-alpha02' }
version { strictly '1.5.0-alpha03' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#3597
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#4275
androidx_preference: dependencies.create('androidx.preference:preference') {
version { strictly '1.2.0-alpha01' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#2754
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#3376
androidx_lifecycle_viewmodel_ktx: dependencies.create('androidx.lifecycle:lifecycle-viewmodel-ktx') {
version { strictly '2.4.0-alpha03' } // 2.4.0-alpha04 in AOSP but was never released
version { strictly '2.5.0-alpha03' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#2550
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#3134
androidx_lifecycle_livedata_ktx: dependencies.create('androidx.lifecycle:lifecycle-livedata-ktx') {
version { strictly '2.4.0-alpha03' } // 2.4.0-alpha04 in AOSP but was never released
version { strictly '2.5.0-alpha03' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/extras/constraint-layout-x/Android.bp#39
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/extras/constraint-layout-x/Android.bp#64
androidx_constraintlayout: dependencies.create('androidx.constraintlayout:constraintlayout') {
version { strictly '2.0.0-beta7' }
version { strictly '2.2.0-alpha05' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#1865
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#2411
androidx_documentfile: dependencies.create('androidx.documentfile:documentfile') {
version { strictly '1.1.0-alpha01' } // 1.1.0-alpha02 in AOSP but not released yet
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/extras/material-design-x/Android.bp#6
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/extras/material-design-x/Android.bp#6
com_google_android_material: dependencies.create('com.google.android.material:material') {
version { strictly '1.6.0-alpha03' } // 1.6.0-alpha0301 in AOSP
version { strictly '1.7.0-alpha03' }
},
]

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Fri Aug 19 10:56:09 IST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
18 changes: 17 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
rootProject.name = 'Seedvault'
include ':app'
include ':contactsbackup'
include ':storage:lib'
include ':storage:demo'
include ':storage:demo'
31 changes: 19 additions & 12 deletions storage/demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
plugins {
id 'com.android.application'
id 'com.google.protobuf'
id 'kotlin-android'
id 'kotlin-kapt'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.kapt'
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
namespace 'de.grobox.storagebackuptester'
compileSdk rootProject.ext.compileSdk

defaultConfig {
applicationId "de.grobox.storagebackuptester"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdk
versionCode 20
versionName "0.9.7"

Expand All @@ -37,17 +37,24 @@ android {
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}
lintOptions {
lint {
disable "DialogFragmentCallbacksDetector",
"InvalidFragmentVersionForActivityResult"
}
packagingOptions {
exclude 'META-INF/*.kotlin_module'
exclude 'META-INF/androidx.*.version'
exclude 'META-INF/services/kotlin*'
exclude 'kotlin/internal/internal.kotlin_builtins'
jniLibs {
excludes += ['META-INF/services/kotlin*']
}
resources {
excludes += [
'META-INF/*.kotlin_module',
'META-INF/androidx.*.version',
'META-INF/services/kotlin*',
'kotlin/internal/internal.kotlin_builtins'
]
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion storage/lib/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android_library {
enabled: false,
},
kotlincflags: [
"-Xopt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.RequiresOptIn",
theimpulson marked this conversation as resolved.
Show resolved Hide resolved
],
}

Expand Down
Loading