Open nathanchilton opened 5 years ago
Sorry you haven't heard back from me immediately. The project is still relying on old versions of ant, scala and Android SDK. I've attempted a port to gradle before, and will do another one soon-ish. I'll keep you updated when I was able to pull it off and have something workable in git.
I've pushed some effort into the new https://github.com/ge0rg/aprsdroid/tree/gradle branch.
It's still flakey, and it currently only supports the OSM version of the app (Google has deprecated the Maps library I'm using).
Instructions:
git clone -b gradle https://github.com/ge0rg/aprsdroid
cd aprsdroid
git submodule init
git submodule update
gradle installDebug # this will fail, because R.java wasn't there yet
gradle installDebug # this should work
There is an evil hack around an issue I've encountered in the gradle-android-scala-plugin, which makes the first compile and non-debug builds fail.
I got past this by modifying build.gradle to match the versions listed here: https://github.com/AllBus/gradle-android-scala-plugin#installation
Specifically:
classpath 'com.android.tools.build:gradle:3.5.3' classpath 'com.github.AllBus:gradle-android-scala-plugin:3.5.1'
Other things you will need to install:
Gradle 5.6.3 java 8 jre and sdk Android 19 sdk Android build tools Your own signing keys as detailed here:
https://stackoverflow.com/questions/18328730/how-to-create-a-release-signed-apk-file-using-gradle
The compiled apk will be at: aprsdroid/build/outputs/apk/release
if you chose to run 'gradle installRelease'
The apk will be in that folder even if you see a warning about a device not being connected.
Other things you will need to install:
Gradle 5.6.3 java 8 jre and sdk Android 19 sdk Android build tools Your own signing keys as detailed here:
https://stackoverflow.com/questions/18328730/how-to-create-a-release-signed-apk-file-using-gradle
The compiled apk will be at: aprsdroid/build/outputs/apk/release
if you chose to run 'gradle installRelease'
The apk will be in that folder even if you see a warning about a device not being connected.
hey can you share the code?
I didn't manage to compile it even after changing the 3.5.1 to 3.5.3 as mentioned above. Would be really cool if you could publish your gradle file so that one could simply compile it in android studio? Thanks !
`gradle installDebug
FAILURE: Build failed with an exception.
Where: Build file '/Users/dg1sek/Developments/aprsdroid/build.gradle' line: 75
What went wrong: A problem occurred evaluating root project 'aprsdroid'.
Could not get unknown property 'RELEASE_STORE_FILE' for SigningConfig_Decorated{name=release, storeFile=null, storePassword=null, keyAlias=null, keyPassword=null, storeType=pkcs12, v1SigningEnabled=true, v2SigningEnabled=true} of type com.android.build.gradle.internal.dsl.SigningConfig.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1s (base) aprsdroid % `
@dg1sek thanks for reporting that. I've now updated the build.gradle in the goole-maps-v2 branch to not require RELEASE_STORE_FILE
(you won't be able to make a release build, which should be fine as you'll do debug anyway).
I also added some more previously missing files, and now the project compiles for me. However, on one of my PCs, the scala.srcDirs
line is deemed as incorrect, so you might have to remove it. It will use the Java path instead, so that is not a big issue.
The instructions for building aprsdroid, shown on on https://github.com/ge0rg/aprsdroid/wiki/Developer, are out of date.
The
android update project -p .
command has been deprecated and is no longer available. Would you please provide current instructions for building this project? I would like to help out with the project, but I can't actually build it.