From 411b600e142cd0d52ec5d346b7b36c050f648ba1 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Fri, 31 Mar 2017 16:04:12 +0800 Subject: [PATCH] Screw that Jack compiler, use retrolambda --- README.md | 4 +--- app/build.gradle | 13 +++++++++---- app/proguard-rules.pro | 6 +++++- build.gradle | 1 + 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7d1c8e128..18be1a567 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,2 @@ # Magisk Manager -The project should be built with Android Studio version 2.2.0+ -I use Java 8 features, which requires Jack compiler and it's only available in 2.2.0+ -Also, 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 diff --git a/app/build.gradle b/app/build.gradle index 4e632f977..b3c3c47f6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.application' +apply plugin: 'me.tatarka.retrolambda' android { compileSdkVersion 25 @@ -10,10 +11,6 @@ android { targetSdkVersion 25 versionCode 28 versionName "4.3.1" - jackOptions { - enabled true - jackInProcess true - } ndk { moduleName 'zipadjust' abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' @@ -38,6 +35,14 @@ android { path 'src/main/jni/CMakeLists.txt' } } + lintOptions { + disable 'MissingTranslation' + } + retrolambda { + javaVersion JavaVersion.VERSION_1_7 + defaultMethods false + incremental true + } } repositories { jcenter() diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index af0e0a2f0..cf6277842 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -22,4 +22,8 @@ -keep interface android.support.v7.** { *; } # SpongyCastle --keep class org.spongycastle.** {*;} +-keep class org.spongycastle.** { *; } +-dontwarn javax.naming.** + +# retrolambda +-dontwarn java.lang.invoke.* diff --git a/build.gradle b/build.gradle index 002f7e7c9..25dde0734 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'me.tatarka:gradle-retrolambda:3.6.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files