ACardEmulator: upgrade to gradle and -plugin

This commit is contained in:
Frank Morgner
2022-01-26 16:49:13 +01:00
parent 7dfe39b67d
commit 8d5247c44d
4 changed files with 15 additions and 38 deletions

View File

@@ -6,25 +6,7 @@ set -ex -o xtrace
pushd ACardEmulator
sudo apt-get install openjdk-8-jdk coreutils
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
wget https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip
mkdir -p $HOME/Android/Sdk
unzip commandlinetools-linux-6200805_latest.zip -d $HOME/Android/Sdk
export ANDROID_HOME=$HOME/Android/Sdk
# Make sure emulator path comes before tools. Had trouble on Ubuntu with emulator from /tools being loaded
# instead of the one from /emulator
export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"
sdkmanager --sdk_root=${ANDROID_HOME} "tools"
sdkmanager --sdk_root=${ANDROID_HOME} --update
sdkmanager --sdk_root=${ANDROID_HOME} --list
sdkmanager --sdk_root=${ANDROID_HOME} "build-tools;23.0.3" "platform-tools" "platforms;android-23" "tools" "ndk;22.0.7026061"
yes | sdkmanager --sdk_root=${ANDROID_HOME} --licenses
git submodule update --init --recursive .
./gradlew assemble

View File

@@ -11,11 +11,10 @@ tasks.withType(JavaCompile) {
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.vsmartcard.acardemulator"
minSdkVersion 19
targetSdkVersion 23
targetSdkVersion 29
versionCode 7
versionName "3.4"
}
@@ -74,7 +73,7 @@ android.applicationVariants.all { variant ->
} else {
newApkName = "${appName}-${output.baseName}-${variant.versionName}-unaligned.apk"
}
output.outputFile = new File(output.outputFile.parent, newApkName)
output.outputFileName = new File(newApkName)
}
}
@@ -82,12 +81,12 @@ dependencies {
shadow localGroovy()
shadow gradleApi()
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:design:23.2.1'
compile 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
compile 'com.google.zxing:core:3.2.1'
compile 'org.bouncycastle:bcprov-jdk14:1.46'
fullCompile files('libs/sdk-v1.0.0.jar')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:23.0.1'
implementation 'com.android.support:support-v4:23.0.1'
implementation 'com.android.support:design:23.2.1'
implementation 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
implementation 'com.google.zxing:core:3.2.1'
implementation 'org.bouncycastle:bcprov-jdk14:1.46'
fullImplementation files('libs/sdk-v1.0.0.jar')
}

View File

@@ -2,13 +2,11 @@
buildscript {
repositories {
maven {
url 'https://maven.google.com'
}
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
// NOTE: Do not place your application dependencies here; they belong
@@ -18,9 +16,7 @@ buildscript {
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
jcenter()
google()
}
}

View File

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