Skip to content

Commit

Permalink
Update dependencies and build system
Browse files Browse the repository at this point in the history
should fix #17 and #19
  • Loading branch information
mar-v-in committed Feb 22, 2016
1 parent 9266799 commit b979589
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 30 deletions.
33 changes: 28 additions & 5 deletions build.gradle
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 µg Project Team
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,24 +19,47 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:1.5.0'
}
}

apply plugin: 'com.android.application'

String getMyVersionName() {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--always', '--dirty'
standardOutput = stdout
}
return stdout.toString().trim()
}

int getMyVersionCode() {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', "HEAD"
standardOutput = stdout
}
return Integer.parseInt(stdout.toString().trim())
}

repositories {
mavenCentral()
}

dependencies {
compile 'org.microg:unifiednlp-api:1.4.0'
compile 'com.android.support:support-v4:23.0.1'
compile 'org.microg:unifiednlp-api:1.5.0'
compile 'com.android.support:support-v4:23.1.1'
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
buildToolsVersion "23.0.2"

defaultConfig {
versionName getMyVersionName()
versionCode (getMyVersionCode() + 20000)
}
}

if (file('user.gradle').exists()) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
#
# Copyright 2013-2015 µg Project Team
# Copyright 2013-2016 microG Project Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 3 additions & 5 deletions src/main/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2013-2015 µg Project Team
~ Copyright 2013-2016 microG Project Team
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -12,11 +12,9 @@
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.microg.nlp.backend.ichnaea"
android:versionCode="10200"
android:versionName="1.2.0">
package="org.microg.nlp.backend.ichnaea">

<uses-sdk
android:minSdkVersion="10"
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 µg Project Team
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -62,8 +62,10 @@ public class BackendService extends HelperLocationBackendService
private boolean useCells = true;

@Override
public void onCreate() {
public synchronized void onCreate() {
super.onCreate();
reloadSettings();
reloadInstanceSettings();
}

@Override
Expand All @@ -75,7 +77,7 @@ protected synchronized void onOpen() {
Log.d(TAG, "Activating instance at process " + Process.myPid());
}

public static void reloadInstanceSttings() {
public static void reloadInstanceSettings() {
if (instance != null) {
instance.reloadSettings();
} else {
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 µg Project Team
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,6 +32,6 @@ protected void onCreate(Bundle savedInstanceState) {
protected void onPause() {
super.onPause();
Log.d(TAG, "Preferences paused, reloading backend settings");
BackendService.reloadInstanceSttings();
BackendService.reloadInstanceSettings();
}
}
26 changes: 13 additions & 13 deletions src/main/res/values/strings.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2013-2015 µg Project Team
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
~ Copyright 2013-2016 microG Project Team
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<resources>
Expand Down
2 changes: 1 addition & 1 deletion src/main/res/xml/preferences.xml
@@ -1,5 +1,5 @@
<!--
~ Copyright 2013-2015 µg Project Team
~ Copyright 2013-2016 microG Project Team
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand Down

0 comments on commit b979589

Please sign in to comment.