Skip to content

Commit 54a082b

Browse files
committed
Update Gradle, build tools, target sdk
1 parent 85e7869 commit 54a082b

File tree

7 files changed

+30
-23
lines changed

7 files changed

+30
-23
lines changed

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ before_script:
55
script:
66
- jdk_switcher use oraclejdk8
77
- export TERM=dumb
8-
- export JAVA_OPTS="-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m"
8+
- export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m"
99
- ./gradlew build
1010
android:
1111
components:
1212
- tools
1313
- platform-tools
14-
- build-tools-25.0.2
15-
- android-25
14+
- build-tools-27.0.3
15+
- android-27
1616
- extra-android-m2repository
17+
licenses:
18+
- '.+'
19+
before_install:
20+
- yes | sdkmanager "platforms;android-27"
1721
before_cache:
1822
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
1923
cache:

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,20 @@
1717
buildscript {
1818
repositories {
1919
jcenter()
20+
google()
2021
}
2122
dependencies {
22-
classpath 'com.android.tools.build:gradle:2.3.1'
23+
classpath 'com.android.tools.build:gradle:3.0.1'
2324
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
2425
}
2526
}
2627

2728
allprojects {
2829
apply plugin: 'idea'
29-
ext.androidBuildVersionTools = "25.0.2"
30+
ext.androidBuildVersionTools = "27.0.3"
3031
}
3132

32-
def androidCompileSdk() { return 25 }
33+
def androidCompileSdk() { return 27 }
3334

3435
def androidTargetSdk() { return 24 }
3536

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ distributionBase=GRADLE_USER_HOME
1919
distributionPath=wrapper/dists
2020
zipStoreBase=GRADLE_USER_HOME
2121
zipStorePath=wrapper/dists
22-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
22+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip

unifiednlp-api/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ android {
3838
}
3939

4040
compileOptions {
41-
sourceCompatibility JavaVersion.VERSION_1_6
41+
sourceCompatibility JavaVersion.VERSION_1_8
42+
targetCompatibility JavaVersion.VERSION_1_8
43+
}
44+
45+
lintOptions {
46+
ignore "MissingPermission"
4247
}
4348
}
4449

unifiednlp-api/src/main/java/org/microg/nlp/api/WiFiBackendHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public WiFiBackendHelper(Context context, Listener listener) {
6565
if (listener == null)
6666
throw new IllegalArgumentException("listener must not be null");
6767
this.listener = listener;
68-
this.wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
68+
this.wifiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
6969
}
7070

7171
/**

unifiednlp-backend-sample/build.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
* limitations under the License.
1515
*/
1616

17-
buildscript {
18-
repositories {
19-
mavenCentral()
20-
jcenter()
21-
}
22-
dependencies {
23-
classpath 'com.android.tools.build:gradle:2.2.2'
24-
}
25-
}
26-
2717
apply plugin: 'com.android.application'
2818

2919
dependencies {
30-
compile project(':unifiednlp-api')
20+
implementation project(':unifiednlp-api')
3121
}
3222

3323
android {
3424
compileSdkVersion androidCompileSdk()
3525
buildToolsVersion "$androidBuildVersionTools"
26+
27+
defaultConfig {
28+
minSdkVersion androidMinSdk()
29+
targetSdkVersion androidTargetSdk()
30+
}
31+
32+
compileOptions {
33+
sourceCompatibility JavaVersion.VERSION_1_8
34+
targetCompatibility JavaVersion.VERSION_1_8
35+
}
3636
}

unifiednlp-backend-sample/src/main/AndroidManifest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
android:versionName="0.0.1"
2222
xmlns:android="http://schemas.android.com/apk/res/android">
2323

24-
<uses-sdk
25-
android:targetSdkVersion="24"
26-
android:minSdkVersion="9" />
2724
<application
2825
android:allowBackup="false"
2926
android:icon="@drawable/icon"

0 commit comments

Comments
 (0)