Remove app-core module

Less confusion
This commit is contained in:
topjohnwu 2019-03-08 10:19:22 -05:00
parent cf65169c99
commit de5c902fdb
37 changed files with 17 additions and 57 deletions

2
app-core/.gitignore vendored
View File

@ -1,2 +0,0 @@
/build
src/main/res/raw/util_functions.sh

View File

@ -1,21 +0,0 @@
apply plugin: 'com.android.library'
android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api project(':net')
api project(':signing')
api 'org.kamranzafar:jtar:2.3'
def libsuVersion = '2.3.1'
api "com.github.topjohnwu.libsu:core:${libsuVersion}"
api "com.github.topjohnwu.libsu:io:${libsuVersion}"
}

View File

@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -1,4 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.topjohnwu.magisk.core" >
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
</manifest>

View File

@ -24,9 +24,10 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':net')
implementation project(':shared')
implementation project(':app-core')
implementation project(':signing')
implementation 'ru.noties:markwon:2.0.1'
implementation 'com.caverock:androidsvg-aar:1.3'
implementation 'org.kamranzafar:jtar:2.3'
implementation 'net.sourceforge.streamsupport:android-retrostreams:1.7.0'
def androidXVersion = "1.0.0"
@ -40,6 +41,10 @@ dependencies {
implementation 'androidx.room:room-runtime:2.0.0'
implementation 'androidx.transition:transition:1.0.1'
def libsuVersion = '2.3.1'
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"
implementation "com.github.topjohnwu.libsu:io:${libsuVersion}"
def butterKnifeVersion = '10.1.0'
implementation "com.jakewharton:butterknife-runtime:${butterKnifeVersion}"
annotationProcessor "com.jakewharton:butterknife-compiler:${butterKnifeVersion}"

View File

@ -6,6 +6,7 @@
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<application
android:allowBackup="true"

View File

@ -8,7 +8,6 @@ import android.os.AsyncTask;
import android.os.Build;
import android.preference.PreferenceManager;
import com.topjohnwu.magisk.core.BuildConfig;
import com.topjohnwu.magisk.database.MagiskDB;
import com.topjohnwu.magisk.database.RepoDatabaseHelper;
import com.topjohnwu.magisk.utils.LocaleManager;

View File

@ -2,8 +2,8 @@ package com.topjohnwu.magisk.utils;
import android.util.Log;
import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.core.BuildConfig;
public class Logger {

View File

@ -6,7 +6,7 @@ import androidx.annotation.NonNull;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.core.R;
import com.topjohnwu.magisk.R;
import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.ShellUtils;
import com.topjohnwu.superuser.io.SuFile;

1
app/src/main/res/raw/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/util_functions.sh

View File

@ -234,7 +234,8 @@ def build_binary(args):
def build_apk(args, module):
build_type = 'Release' if args.release else 'Debug'
proc = execv([gradlew, f'{module}:assemble{build_type}', '-PconfigPath=' + os.path.abspath(args.config)])
proc = execv([gradlew, f'{module}:assemble{build_type}',
'-PconfigPath=' + os.path.abspath(args.config)])
if proc.returncode != 0:
error('Build Magisk Manager failed!')
@ -251,7 +252,7 @@ def build_apk(args, module):
def build_app(args):
header('Building Magisk Manager')
source = os.path.join('scripts', 'util_functions.sh')
target = os.path.join('app-core', 'src', 'main',
target = os.path.join('app', 'src', 'main',
'res', 'raw', 'util_functions.sh')
cp(source, target)
build_apk(args, 'app')
@ -324,8 +325,9 @@ def zip_main(args):
source = os.path.join('scripts', 'util_functions.sh')
with open(source, 'r') as script:
# Add version info util_functions.sh
util_func = script.read().replace('#MAGISK_VERSION_STUB',
f'MAGISK_VER="{config["version"]}"\nMAGISK_VER_CODE={config["versionCode"]}')
util_func = script.read().replace(
'#MAGISK_VERSION_STUB',
f'MAGISK_VER="{config["version"]}"\nMAGISK_VER_CODE={config["versionCode"]}')
target = os.path.join('common', 'util_functions.sh')
vprint(f'zip: {source} -> {target}')
zipf.writestr(target, util_func)

View File

@ -1 +1 @@
include ':app', ':app-core', ':net', ':signing', ':native', ':snet', ':stub', ':shared'
include ':app', ':net', ':signing', ':native', ':snet', ':stub', ':shared'