Java modules: Upgrade to AGP 7.4.0 & Gradle 7.6

Fix the issues that were reported because of that change:

WARNING:The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (30.0.3) for Android Gradle Plugin 7.4.0.
Android SDK Build Tools 30.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

android:exported needs to be explicitly specified for element <activity#com.crocoapps.javafilestoragetest2.MainActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated.
Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace
This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.

.../keepass2android/src/java/KP2ASoftkeyboard_AS/app/src/main/AndroidManifest.xml:5:5-46 Warning:
	uses-sdk:targetSdkVersion value (14) specified in the manifest file is ignored. It is overridden by the value declared in the DSL or the variant API, or 1 if not declared/present. Current value is (18).
This commit is contained in:
tenzap
2023-01-26 20:44:29 +01:00
parent 5bdf93633f
commit d6486d4b98
30 changed files with 74 additions and 71 deletions

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

@@ -8,7 +8,7 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.2' classpath "com.android.tools.build:gradle:7.4.0"
} }
} }

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

@@ -9,7 +9,7 @@ buildscript {
} }
} }
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

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

@@ -9,7 +9,7 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.0.1' classpath "com.android.tools.build:gradle:7.4.0"
} }
} }

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

@@ -8,7 +8,7 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath "com.android.tools.build:gradle:4.0.1" classpath "com.android.tools.build:gradle:7.4.0"
} }
} }

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

@@ -3,13 +3,10 @@
buildscript { buildscript {
repositories { repositories {
jcenter() jcenter()
maven { google()
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

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

@@ -2,18 +2,16 @@
buildscript { buildscript {
repositories { repositories {
jcenter() jcenter()
maven { google()
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() jcenter()
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-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

@@ -9,7 +9,7 @@ buildscript {
} }
} }
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

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