Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build tools #226

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ Main repository for the openbmap client 'Radiobeacon'
Radiobeacon tracks cells and wifis and uploads them to the openbmap database available at https://radiocells.org

# Build requirements
- Android Studio 1.5
- Android Studio v2 or higher. Tested with v3.2.1
- JRE 1.8.0 (Java 8).

To get started open Android Studio, File Menu --> New --> Project from Version Control --> Github --> add repository https://github.com/wish7code/openbmap.git

# Potential issues
- Java 10 does not work with gradle under some circumstances? https://github.com/gradle/gradle/issues/4503

# Related projects
openbmap Unified Network Location Provider
Uses the openbmap dataset for cell and wifi based geo-location
https://github.com/wish7code/org.openbmap.unifiedNlpProvider/issues

# Binaries
Binaries are available at https://f-droid.org/repository/browse/?fdid=org.openbmap

27 changes: 14 additions & 13 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

android {
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 28
buildToolsVersion "28.0.2"
defaultConfig {
applicationId "org.openbmap"
minSdkVersion 13
targetSdkVersion 23
targetSdkVersion 28
}
buildTypes {
debug {
Expand Down Expand Up @@ -43,8 +42,16 @@ buildscript {
dependencies {
// replace with the current version of the Android plugin
classpath 'com.android.tools.build:gradle:2.3.0'
// the latest version of the android-apt plugin
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}

android {
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments = [ eventBusIndex : 'org.openbmap.MyEventBusIndex' ]
}
}
}
}

Expand All @@ -55,7 +62,7 @@ dependencies {
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:support-v13:23.2.1'
compile 'org.greenrobot:eventbus:3.0.0'
apt 'org.greenrobot:eventbus-annotation-processor:3.0.1'
annotationProcessor 'org.greenrobot:eventbus-annotation-processor:3.0.1'
compile 'com.caverock:androidsvg:1.2.1'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.jjoe64:graphview:4.1.0'
Expand All @@ -67,12 +74,6 @@ dependencies {
compile 'org.mapsforge:mapsforge-map-reader:0.6.1'
}

apt {
arguments {
eventBusIndex "org.openbmap.MyEventBusIndex"
}
}

task writeVersionInfo {
// This will output something like 'bf16f5d', or 'bf16f5d-dirty' if the tree has uncommitted changes
def cmd = "git describe --match=null --always --dirty"
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-sdk android:minSdkVersion="13" android:targetSdkVersion="23"/>
<uses-sdk android:minSdkVersion="13" android:targetSdkVersion="28"/>

<application
android:name="org.openbmap.RadiobeaconApplication"
Expand Down
8 changes: 5 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ apply plugin: 'com.github.ben-manes.versions'
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.11.3'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
}
}

allprojects {
repositories {
jcenter()
google()
}
}
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip