Finally, official Java 8 support

This commit is contained in:
topjohnwu 2017-04-05 17:02:18 +08:00
parent 411b600e14
commit ae88d3054d
6 changed files with 7 additions and 15 deletions

View File

@ -1,2 +1,4 @@
# Magisk Manager # Magisk Manager
I used Java 8 features in the app, and official supported is added in Android Studio 2.4
Aware that Android Studio 2.4 is currently in the Preview Channel
You need to install CMake and NDK to build the zipadjust library for zip preprocessing You need to install CMake and NDK to build the zipadjust library for zip preprocessing

View File

@ -1,9 +1,8 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android { android {
compileSdkVersion 25 compileSdkVersion 25
buildToolsVersion "25.0.2" buildToolsVersion "26.0.0-rc1"
defaultConfig { defaultConfig {
applicationId "com.topjohnwu.magisk" applicationId "com.topjohnwu.magisk"
@ -38,11 +37,6 @@ android {
lintOptions { lintOptions {
disable 'MissingTranslation' disable 'MissingTranslation'
} }
retrolambda {
javaVersion JavaVersion.VERSION_1_7
defaultMethods false
incremental true
}
} }
repositories { repositories {
jcenter() jcenter()
@ -57,7 +51,6 @@ dependencies {
compile 'com.android.support:design:25.3.1' compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1' compile 'com.android.support:support-v4:25.3.1'
compile 'com.jakewharton:butterknife:8.5.1' compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.github.clans:fab:1.6.4'
compile 'com.thoughtbot:expandablerecyclerview:1.4' compile 'com.thoughtbot:expandablerecyclerview:1.4'
compile 'us.feras.mdv:markdownview:1.1.0' compile 'us.feras.mdv:markdownview:1.1.0'
compile 'com.madgag.spongycastle:core:1.54.0.0' compile 'com.madgag.spongycastle:core:1.54.0.0'

View File

@ -25,5 +25,3 @@
-keep class org.spongycastle.** { *; } -keep class org.spongycastle.** { *; }
-dontwarn javax.naming.** -dontwarn javax.naming.**
# retrolambda
-dontwarn java.lang.invoke.*

View File

@ -997,7 +997,7 @@ public class ZipUtils {
return manifest; return manifest;
} }
public Enumeration<JarEntry> entries() { public Enumeration<JarEntry> entries() {
Iterator<Entry<String, Pair<JarEntry, ByteArrayOutputStream> >> i = entrySet().iterator(); Iterator<Map.Entry<String, Pair<JarEntry, ByteArrayOutputStream> >> i = entrySet().iterator();
ArrayList<JarEntry> list = new ArrayList<>(); ArrayList<JarEntry> list = new ArrayList<>();
while (i.hasNext()) while (i.hasNext())
list.add(i.next().getValue().first); list.add(i.next().getValue().first);

View File

@ -6,8 +6,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.0' classpath 'com.android.tools.build:gradle:2.4.0-alpha4'
classpath 'me.tatarka:gradle-retrolambda:3.6.0'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files

View File

@ -1,6 +1,6 @@
#Wed Aug 17 11:39:12 CEST 2016 #Wed Apr 05 09:31:45 CST 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip