Files
andors-trail/travis/support/script
Nut.andor 1cec98249b Migration to actual AndroidStudio version
Copy  ...\AndorsTrailRelease\andors-trail\AndorsTrail  to  a temporary directory, then delete the content except the .git directory.   (C:\AT\AndorsTrailRelease_before_Mig_20220925)

Open Android Studio, any project
New >> Import project

> Import Project, select the AndorsTrail folder from the temporary location
	C:\AT\AndorsTrailRelease_before_Mig_20220925\andors-trail\AndorsTrail
  Destination: C:\AT\AndorsTrailRelease\andors-trail\AndorsTrail

Click next a few times.
It then shows some error about not finding build tools. Below it there should be the option to 'Add google Maven reposiroty and sync project'. Click that option and then 'Do Refactor' (Bottom Left).

In the newly created file 'app/build.gradle'
In line 4 change the compileSdkVersion to 30 (or higher?)
In line 9 change the minSdkVersion to 14 instead of 4
In line 22 change the version from '29.+' to '28.0.0' and the compile at the beginning to implementation
Then Click 'Sync Project with Gradle Files' (icon in top right) that should no longer give errors.
2022-09-25 13:16:57 +02:00

33 lines
912 B
Bash

#!/bin/sh
set -e
cd AndorsTrail
: ${TARGET_OS:=stretch}
ln -s ../travis/support.$TARGET_OS/build.gradle \
../travis/support/gradle.properties ../travis/support/local.properties .
mkdir -p src/main/assets/translation src/main/java
ln -s ../../AndroidManifest.xml ../../res src/main
ln -s ../../com src/main/java
for po in assets/translation/*.po
do
msgfmt -o src/main/${po%.po}.mo $po
done
gradle assembleRelease
keytool -genkeypair -v -keystore keystore.p12 -storepass changeit \
-keypass changeit -storetype pkcs12 -alias self -keyalg RSA \
-validity 10000 -dname \
"CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown"
VERSION=$(grep android:versionCode AndroidManifest.xml | cut -d \" -f 2)
APK=com.gpl.rpg.AndorsTrail_$VERSION.apk
apksigner sign --out $APK -v --ks keystore.p12 --ks-pass pass:changeit \
build/outputs/apk/AndorsTrail-release-unsigned.apk
apksigner verify $APK