Merge pull request #2203 from tenzap/009-updateAGPandGradle

Java modules: upgrade Android gradle plugin & Gradle
This commit is contained in:
PhilippC
2023-01-28 21:02:53 +01:00
committed by GitHub
31 changed files with 107 additions and 117 deletions

View File

@@ -49,11 +49,10 @@ jobs:
# If using the github runner 'macos-10.15' # If using the github runner 'macos-10.15'
# $VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12 --android=11.2 # $VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12 --android=11.2
- name: Switch to JDK-8 - name: Switch to JDK-11
if: ${{ false }} # Not needed, we stay with the default installed JDK
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: '8' java-version: '11'
distribution: 'temurin' distribution: 'temurin'
- name: Display java version - name: Display java version
@@ -177,11 +176,10 @@ jobs:
sudo apt install -y ./xamarin.android-oss/*.deb && sudo apt install -y ./xamarin.android-oss/*.deb &&
echo "$HOME/xamarin.android-oss/bin/Release/bin" >> $GITHUB_PATH echo "$HOME/xamarin.android-oss/bin/Release/bin" >> $GITHUB_PATH
- name: Switch to JDK-8 - name: Switch to JDK-11
if: ${{ false }} # Not needed, we stay with the default installed JDK
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: '8' java-version: '11'
distribution: 'temurin' distribution: 'temurin'
- name: Display java version - name: Display java version
@@ -279,6 +277,15 @@ jobs:
# If we want to also have nmake, use this instead # If we want to also have nmake, use this instead
#uses: ilammy/msvc-dev-cmd@v1 #uses: ilammy/msvc-dev-cmd@v1
- name: Switch to JDK-11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Display java version
run: java -version
# Some components of Keepass2Android currently target android API 26 which are not available on the runner # Some components of Keepass2Android currently target android API 26 which are not available on the runner
- name: Download android-26 API - name: Download android-26 API
shell: cmd shell: cmd

View File

@@ -1,8 +1,11 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
namespace 'keepass2android.javafilestorage'
compileSdkVersion 28 compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
minSdkVersion 15 minSdkVersion 15
targetSdkVersion 28 targetSdkVersion 28
@@ -27,27 +30,27 @@ NOTE: If you change dependencies here, don't forget to update the jar files in J
dependencies { dependencies {
compile 'com.squareup.okhttp3:okhttp:4.10.0-RC1' implementation 'com.squareup.okhttp3:okhttp:4.10.0-RC1'
compile 'com.burgstaller:okhttp-digest:2.5' implementation 'com.burgstaller:okhttp-digest:2.5'
compile 'com.google.http-client:google-http-client-gson:1.20.0' implementation 'com.google.http-client:google-http-client-gson:1.20.0'
compile('com.google.api-client:google-api-client-android:1.30.5') { implementation('com.google.api-client:google-api-client-android:1.30.5') {
exclude group: 'com.google.android.google-play-services' exclude group: 'com.google.android.google-play-services'
} }
compile 'com.google.apis:google-api-services-drive:v2-rev102-1.16.0-rc' implementation 'com.google.apis:google-api-services-drive:v2-rev102-1.16.0-rc'
compile 'com.dropbox.core:dropbox-core-sdk:4.0.0' implementation 'com.dropbox.core:dropbox-core-sdk:4.0.0'
implementation 'com.google.api-client:google-api-client:1.30.5' implementation 'com.google.api-client:google-api-client:1.30.5'
implementation 'com.google.api-client:google-api-client-android:1.30.5' implementation 'com.google.api-client:google-api-client-android:1.30.5'
implementation 'com.google.android.gms:play-services-auth:20.4.0' implementation 'com.google.android.gms:play-services-auth:20.4.0'
//onedrive: //onedrive:
compile('com.onedrive.sdk:onedrive-sdk-android:1.2.0') { implementation('com.onedrive.sdk:onedrive-sdk-android:1.2.0') {
transitive = false transitive = false
} }
compile 'com.pcloud.sdk:java-core:1.2.0' implementation 'com.pcloud.sdk:java-core:1.2.0'
compile 'com.pcloud.sdk:android:1.2.0' implementation 'com.pcloud.sdk:android:1.2.0'
compile 'com.google.code.gson:gson:2.8.6' implementation 'com.google.code.gson:gson:2.8.6'
compile 'com.microsoft.services.msa:msa-auth:0.8.6' implementation 'com.microsoft.services.msa:msa-auth:0.8.6'
compile 'com.microsoft.aad:adal:1.14.0' implementation 'com.microsoft.aad:adal:1.14.0'
} }

View File

@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="keepass2android.javafilestorage"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0"> android:versionName="1.0">
<uses-sdk
android:targetSdkVersion="14" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" />

View File

@@ -1,20 +1,19 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
repositories { repositories {
google()
mavenCentral()
jcenter() jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.2' classpath "com.android.tools.build:gradle:7.4.0"
} }
} }
allprojects { allprojects {
repositories { repositories {
jcenter()
google() google()
mavenCentral()
jcenter()
} }
} }

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip

View File

@@ -1,13 +1,14 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
namespace "com.crocoapps.javafilestoragetest2"
compileSdkVersion 28 compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
applicationId "com.crocoapps.javafilestoragetest2" applicationId "com.crocoapps.javafilestoragetest2"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 31
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
multiDexEnabled true multiDexEnabled true
@@ -31,10 +32,11 @@ android {
//apply plugin: 'com.getkeepsafe.dexcount' //apply plugin: 'com.getkeepsafe.dexcount'
dependencies { dependencies {
compile project(':android-filechooser') implementation project(':android-filechooser')
compile project(':JavaFileStorage') implementation project(':JavaFileStorage')
implementation "androidx.annotation:annotation:1.5.0"
} }
configurations { configurations {
compile.exclude group: "org.apache.httpcomponents", module: "httpclient" implementation.exclude group: "org.apache.httpcomponents", module: "httpclient"
} }

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools">
package="com.crocoapps.javafilestoragetest2">
<application <application
android:allowBackup="true" android:allowBackup="true"
@@ -9,7 +8,8 @@
android:label="@string/app_name" android:label="@string/app_name"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name="com.crocoapps.javafilestoragetest2.MainActivity"> <activity android:name="com.crocoapps.javafilestoragetest2.MainActivity"
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -49,6 +49,7 @@
</activity> </activity>
<activity <activity
android:name="com.dropbox.core.android.AuthActivity" android:name="com.dropbox.core.android.AuthActivity"
android:exported="true"
android:configChanges="orientation|keyboard" android:configChanges="orientation|keyboard"
android:launchMode="singleTask" > android:launchMode="singleTask" >
<intent-filter> <intent-filter>
@@ -63,7 +64,8 @@
</activity> </activity>
<activity <activity
android:name="com.microsoft.identity.client.BrowserTabActivity"> android:name="com.microsoft.identity.client.BrowserTabActivity"
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />

View File

@@ -2,14 +2,12 @@
buildscript { buildscript {
repositories { repositories {
google()
mavenCentral()
jcenter() jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.2' classpath "com.android.tools.build:gradle:7.4.0"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
@@ -20,8 +18,9 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
jcenter()
google() google()
mavenCentral()
jcenter()
} }
} }

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip

View File

@@ -1,8 +1,10 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
namespace 'keepass2android.kp2akeytransform'
compileSdkVersion 23 compileSdkVersion 23
buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

View File

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="keepass2android.kp2akeytransform"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0" > android:versionName="1.0" >

View File

@@ -1,25 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
repositories { repositories {
jcenter()
google() google()
maven { mavenCentral()
url 'https://maven.google.com/'
name 'Google'
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.0.1' classpath "com.android.tools.build:gradle:7.4.0"
} }
} }
allprojects { allprojects {
repositories { repositories {
jcenter()
google() google()
maven { mavenCentral()
url 'https://maven.google.com/'
name 'Google'
}
} }
} }

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip

View File

@@ -1,7 +1,9 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
namespace 'keepass2android.softkeyboard'
compileSdkVersion 23 compileSdkVersion 23
buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
minSdkVersion 18 minSdkVersion 18

View File

@@ -1,8 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="keepass2android.softkeyboard">
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE"/>
<uses-sdk android:targetSdkVersion="14"/>
<application <application
android:killAfterRestore="false"> android:killAfterRestore="false">

View File

@@ -1,24 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
repositories { repositories {
jcenter() google()
maven { mavenCentral()
url 'https://maven.google.com/'
name 'Google'
}
} }
dependencies { dependencies {
classpath "com.android.tools.build:gradle:4.0.1" classpath "com.android.tools.build:gradle:7.4.0"
} }
} }
allprojects { allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
} }
} }

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip

View File

@@ -1,7 +1,9 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
namespace 'keepass2android.pluginsdk'
compileSdkVersion 23 compileSdkVersion 23
buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
minSdkVersion 8 minSdkVersion 8

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="keepass2android.pluginsdk"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0" > android:versionName="1.0" >

View File

@@ -2,14 +2,11 @@
buildscript { buildscript {
repositories { repositories {
jcenter() google()
maven { mavenCentral()
url 'https://maven.google.com/'
name 'Google'
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.0' classpath "com.android.tools.build:gradle:7.4.0"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
@@ -20,8 +17,8 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
jcenter()
google() google()
mavenCentral()
} }
} }

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip

View File

@@ -1,13 +1,13 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
namespace 'keepass2android.plugin.qr'
compileSdkVersion 26 compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
applicationId "keepass2android.plugin.qr" applicationId "keepass2android.plugin.qr"
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 19 targetSdkVersion 31
versionCode 3 versionCode 3
versionName "1.0.2" versionName "1.0.2"
} }
@@ -32,6 +32,6 @@ android {
} }
dependencies { dependencies {
compile project(':Keepass2AndroidPluginSDK2') implementation project(':Keepass2AndroidPluginSDK2')
compile 'com.google.zxing:core:2.3.0' implementation 'com.google.zxing:core:2.3.0'
} }

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="keepass2android.plugin.qr" >
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.CAMERA"/>
<uses-permission <uses-permission
@@ -20,6 +19,7 @@
android:theme="@style/AppTheme" > android:theme="@style/AppTheme" >
<activity <activity
android:name="keepass2android.plugin.qr.QRActivity" android:name="keepass2android.plugin.qr.QRActivity"
android:exported="true"
android:label="@string/title_activity_qr" > android:label="@string/title_activity_qr" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -47,6 +47,7 @@
<activity <activity
android:name="keepass2android.plugin.qr.MainActivity" android:name="keepass2android.plugin.qr.MainActivity"
android:exported="true"
android:label="@string/app_name" android:label="@string/app_name"
> >
<intent-filter> <intent-filter>

View File

@@ -1,19 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
repositories { repositories {
jcenter() google()
maven { mavenCentral()
url 'https://maven.google.com/'
name 'Google'
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.2' classpath "com.android.tools.build:gradle:7.4.0"
} }
} }
allprojects { allprojects {
repositories { repositories {
jcenter() google()
mavenCentral()
} }
} }

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip

View File

@@ -1,8 +1,10 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
namespace 'group.pals.android.lib.ui.filechooser'
compileSdkVersion 28 compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
@@ -23,5 +25,5 @@ android {
} }
dependencies { dependencies {
compile 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
} }

View File

@@ -6,8 +6,7 @@
permission. permission.
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="group.pals.android.lib.ui.filechooser" >
</manifest> </manifest>

View File

@@ -2,14 +2,11 @@
buildscript { buildscript {
repositories { repositories {
jcenter() google()
maven { mavenCentral()
url 'https://maven.google.com/'
name 'Google'
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.2' classpath "com.android.tools.build:gradle:7.4.0"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
@@ -20,8 +17,8 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
jcenter()
google() google()
mavenCentral()
} }
} }

View File

@@ -1 +1,2 @@
org.gradle.jvmargs=-Xmx1024m org.gradle.jvmargs=-Xmx1024m
android.useAndroidX=true

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip

0
src/java/android-filechooser-AS/gradlew vendored Normal file → Executable file
View File