Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
68fbdd47
Commit
68fbdd47
authored
Jul 18, 2021
by
vvb2060
Committed by
John Wu
Sep 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Target SDK 31
parent
2cbc0483
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
197 additions
and
150 deletions
+197
-150
build.gradle.kts
app/build.gradle.kts
+19
-21
proguard-rules.pro
app/proguard-rules.pro
+5
-0
build.gradle.kts
app/shared/build.gradle.kts
+0
-4
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+4
-4
DownloadService.kt
...ava/com/topjohnwu/magisk/core/download/DownloadService.kt
+6
-7
build.gradle.kts
build.gradle.kts
+8
-7
build.gradle.kts
buildSrc/build.gradle.kts
+1
-1
gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.jar
+0
-0
gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
+1
-1
gradlew
gradlew
+153
-104
build.gradle.kts
stub/build.gradle.kts
+0
-1
No files found.
app/build.gradle.kts
View file @
68fbdd47
...
@@ -27,17 +27,14 @@ android {
...
@@ -27,17 +27,14 @@ android {
vectorDrawables
.
useSupportLibrary
=
true
vectorDrawables
.
useSupportLibrary
=
true
versionName
=
Config
.
version
versionName
=
Config
.
version
versionCode
=
Config
.
versionCode
versionCode
=
Config
.
versionCode
ndk
.
abiFilters
.
addAll
(
listOf
(
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
,
"x86_64"
)
)
ndk
.
abiFilters
+=
listOf
(
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
,
"x86_64"
)
}
}
buildTypes
{
buildTypes
{
getByName
(
"release"
)
{
getByName
(
"release"
)
{
isMinifyEnabled
=
true
isMinifyEnabled
=
true
isShrinkResources
=
true
isShrinkResources
=
true
proguardFiles
(
proguardFiles
(
"proguard-rules.pro"
)
getDefaultProguardFile
(
"proguard-android-optimize.txt"
),
"proguard-rules.pro"
)
}
}
}
}
...
@@ -52,16 +49,16 @@ android {
...
@@ -52,16 +49,16 @@ android {
packagingOptions
{
packagingOptions
{
resources
{
resources
{
excludes
.
add
(
"/META-INF/*"
)
excludes
+=
"/META-INF/*"
excludes
.
add
(
"/org/bouncycastle/**"
)
excludes
+=
"/org/bouncycastle/**"
excludes
.
add
(
"/kotlin/**"
)
excludes
+=
"/kotlin/**"
excludes
.
add
(
"/kotlinx/**"
)
excludes
+=
"/kotlinx/**"
excludes
.
add
(
"/okhttp3/**"
)
excludes
+=
"/okhttp3/**"
excludes
.
add
(
"/*.txt"
)
excludes
+=
"/*.txt"
excludes
.
add
(
"/*.bin"
)
excludes
+=
"/*.bin"
}
}
jniLibs
{
jniLibs
{
keepDebugSymbols
.
add
(
"**/*.so"
)
keepDebugSymbols
+=
"**/*.so"
}
}
}
}
...
@@ -119,9 +116,9 @@ val syncAssets by tasks.registering(Sync::class) {
...
@@ -119,9 +116,9 @@ val syncAssets by tasks.registering(Sync::class) {
}
}
filesMatching
(
"**/util_functions.sh"
)
{
filesMatching
(
"**/util_functions.sh"
)
{
filter
{
filter
{
it
.
replace
(
"#MAGISK_VERSION_STUB"
,
it
.
replace
(
"
MAGISK_VER='${Config.version}'\n"
+
"
#MAGISK_VERSION_STUB"
,
"MAGISK_VER_CODE=${Config.versionCode}"
"MAGISK_VER
='${Config.version}'\nMAGISK_VER
_CODE=${Config.versionCode}"
)
)
}
}
filter
<
FixCrLfFilter
>(
"eol"
to
FixCrLfFilter
.
CrLf
.
newInstance
(
"lf"
))
filter
<
FixCrLfFilter
>(
"eol"
to
FixCrLfFilter
.
CrLf
.
newInstance
(
"lf"
))
...
@@ -177,11 +174,12 @@ android.applicationVariants.all {
...
@@ -177,11 +174,12 @@ android.applicationVariants.all {
registerJavaGeneratingTask
(
genSrcTask
,
outSrcDir
)
registerJavaGeneratingTask
(
genSrcTask
,
outSrcDir
)
}
}
configurations
.
all
{
exclude
(
"org.jetbrains.kotlin"
,
"kotlin-stdlib-jdk7"
)
exclude
(
"org.jetbrains.kotlin"
,
"kotlin-stdlib-jdk8"
)
}
dependencies
{
dependencies
{
implementation
(
fileTree
(
mapOf
(
"dir"
to
"libs"
,
"include"
to
listOf
(
"*.jar"
))))
implementation
(
kotlin
(
"stdlib"
))
// Some dependencies request JDK 8 stdlib, specify manually here to prevent version mismatch
implementation
(
kotlin
(
"stdlib-jdk8"
))
implementation
(
project
(
":app:shared"
))
implementation
(
project
(
":app:shared"
))
implementation
(
"com.github.topjohnwu:jtar:1.0.0"
)
implementation
(
"com.github.topjohnwu:jtar:1.0.0"
)
...
@@ -238,7 +236,7 @@ dependencies {
...
@@ -238,7 +236,7 @@ dependencies {
implementation
(
"androidx.preference:preference:1.1.1"
)
implementation
(
"androidx.preference:preference:1.1.1"
)
implementation
(
"androidx.recyclerview:recyclerview:1.2.1"
)
implementation
(
"androidx.recyclerview:recyclerview:1.2.1"
)
implementation
(
"androidx.fragment:fragment-ktx:1.3.6"
)
implementation
(
"androidx.fragment:fragment-ktx:1.3.6"
)
implementation
(
"androidx.work:work-runtime-ktx:2.
5.0
"
)
implementation
(
"androidx.work:work-runtime-ktx:2.
7.0-alpha05
"
)
implementation
(
"androidx.transition:transition:1.4.1"
)
implementation
(
"androidx.transition:transition:1.4.1"
)
implementation
(
"androidx.core:core-ktx:1.6.0"
)
implementation
(
"androidx.core:core-ktx:1.6.0"
)
implementation
(
"com.google.android.material:material:1.4.0"
)
implementation
(
"com.google.android.material:material:1.4.0"
)
...
...
app/proguard-rules.pro
View file @
68fbdd47
...
@@ -16,6 +16,11 @@
...
@@ -16,6 +16,11 @@
# public *;
# public *;
#}
#}
# Parcelable
-
keepclassmembers
class
*
implements
android
.
os
.
Parcelable
{
public
static
final
**
CREATOR
;
}
# Kotlin
# Kotlin
-
assumenosideeffects
class
kotlin
.
jvm
.
internal
.
Intrinsics
{
-
assumenosideeffects
class
kotlin
.
jvm
.
internal
.
Intrinsics
{
public
static
void
check
*
(...);
public
static
void
check
*
(...);
...
...
app/shared/build.gradle.kts
View file @
68fbdd47
...
@@ -8,7 +8,3 @@ android {
...
@@ -8,7 +8,3 @@ android {
consumerProguardFiles
(
"proguard-rules.pro"
)
consumerProguardFiles
(
"proguard-rules.pro"
)
}
}
}
}
dependencies
{
implementation
(
fileTree
(
mapOf
(
"dir"
to
"libs"
,
"include"
to
listOf
(
"*.jar"
))))
}
app/src/main/AndroidManifest.xml
View file @
68fbdd47
...
@@ -77,10 +77,10 @@
...
@@ -77,10 +77,10 @@
<!-- Initialize WorkManager on-demand -->
<!-- Initialize WorkManager on-demand -->
<provider
<provider
android:name=
"androidx.
work.impl.WorkManagerInitializ
er"
android:name=
"androidx.
startup.InitializationProvid
er"
android:authorities=
"${applicationId}.
workmanager-init
"
android:authorities=
"${applicationId}.
androidx-startup
"
tools:node=
"remove"
tools:node=
"remove"
>
tools:ignore=
"ExportedContentProvider"
/
>
</provider
>
<!-- We don't invalidate Room -->
<!-- We don't invalidate Room -->
<service
<service
...
...
app/src/main/java/com/topjohnwu/magisk/core/download/DownloadService.kt
View file @
68fbdd47
...
@@ -59,9 +59,8 @@ open class DownloadService : BaseDownloader() {
...
@@ -59,9 +59,8 @@ open class DownloadService : BaseDownloader() {
=
setContentIntent
(
APKInstall
.
installIntent
(
context
,
subject
.
file
.
toFile
()))
=
setContentIntent
(
APKInstall
.
installIntent
(
context
,
subject
.
file
.
toFile
()))
private
fun
Notification
.
Builder
.
setContentIntent
(
intent
:
Intent
)
=
private
fun
Notification
.
Builder
.
setContentIntent
(
intent
:
Intent
)
=
setContentIntent
(
setContentIntent
(
PendingIntent
.
getActivity
(
context
,
nextInt
(),
intent
,
PendingIntent
.
getActivity
(
context
,
nextInt
(),
intent
,
PendingIntent
.
FLAG_ONE_SHOT
)
PendingIntent
.
FLAG_IMMUTABLE
or
PendingIntent
.
FLAG_ONE_SHOT
))
)
// ---
// ---
...
@@ -72,11 +71,11 @@ open class DownloadService : BaseDownloader() {
...
@@ -72,11 +71,11 @@ open class DownloadService : BaseDownloader() {
fun
pendingIntent
(
context
:
Context
,
subject
:
Subject
):
PendingIntent
{
fun
pendingIntent
(
context
:
Context
,
subject
:
Subject
):
PendingIntent
{
return
if
(
Build
.
VERSION
.
SDK_INT
>=
26
)
{
return
if
(
Build
.
VERSION
.
SDK_INT
>=
26
)
{
PendingIntent
.
getForegroundService
(
context
,
nextInt
(),
PendingIntent
.
getForegroundService
(
context
,
nextInt
(),
intent
(
context
,
subject
),
intent
(
context
,
subject
),
PendingIntent
.
FLAG_UPDATE_CURRENT
)
PendingIntent
.
FLAG_IMMUTABLE
or
PendingIntent
.
FLAG_UPDATE_CURRENT
)
}
else
{
}
else
{
PendingIntent
.
getService
(
context
,
nextInt
(),
PendingIntent
.
getService
(
context
,
nextInt
(),
intent
(
context
,
subject
),
intent
(
context
,
subject
),
PendingIntent
.
FLAG_UPDATE_CURRENT
)
PendingIntent
.
FLAG_IMMUTABLE
or
PendingIntent
.
FLAG_UPDATE_CURRENT
)
}
}
}
}
...
...
build.gradle.kts
View file @
68fbdd47
...
@@ -12,12 +12,12 @@ buildscript {
...
@@ -12,12 +12,12 @@ buildscript {
mavenCentral
()
mavenCentral
()
}
}
val
vNav
=
"2.
3.5
"
val
vNav
=
"2.
4.0-alpha06
"
extra
[
"vNav"
]
=
vNav
extra
[
"vNav"
]
=
vNav
dependencies
{
dependencies
{
classpath
(
"com.android.tools.build:gradle:7.0.1"
)
classpath
(
"com.android.tools.build:gradle:7.0.1"
)
classpath
(
kotlin
(
"gradle-plugin"
,
version
=
"1.5.
21
"
))
classpath
(
kotlin
(
"gradle-plugin"
,
version
=
"1.5.
30
"
))
classpath
(
"androidx.navigation:navigation-safe-args-gradle-plugin:${vNav}"
)
classpath
(
"androidx.navigation:navigation-safe-args-gradle-plugin:${vNav}"
)
// NOTE: Do not place your application dependencies here; they belong
// NOTE: Do not place your application dependencies here; they belong
...
@@ -41,16 +41,17 @@ subprojects {
...
@@ -41,16 +41,17 @@ subprojects {
afterEvaluate
{
afterEvaluate
{
if
(
plugins
.
hasPlugin
(
"com.android.library"
)
||
if
(
plugins
.
hasPlugin
(
"com.android.library"
)
||
plugins
.
hasPlugin
(
"com.android.application"
))
{
plugins
.
hasPlugin
(
"com.android.application"
)
)
{
android
{
android
{
compileSdkVersion
(
3
0
)
compileSdkVersion
(
3
1
)
buildToolsVersion
=
"3
0.0.3
"
buildToolsVersion
=
"3
1.0.0
"
ndkPath
=
"${System.getenv("
ANDROID_SDK_ROOT
")}/ndk/magisk"
ndkPath
=
"${System.getenv("
ANDROID_SDK_ROOT
")}/ndk/magisk"
defaultConfig
{
defaultConfig
{
if
(
minSdk
==
null
)
if
(
minSdk
==
null
)
minSdk
=
21
minSdk
=
21
targetSdk
=
3
0
targetSdk
=
3
1
}
}
compileOptions
{
compileOptions
{
...
@@ -96,7 +97,7 @@ subprojects {
...
@@ -96,7 +97,7 @@ subprojects {
}
}
lintOptions
{
lintOptions
{
disable
(
"MissingTranslation"
)
disable
+=
"MissingTranslation"
}
}
}
}
}
}
...
...
buildSrc/build.gradle.kts
View file @
68fbdd47
...
@@ -15,5 +15,5 @@ gradlePlugin {
...
@@ -15,5 +15,5 @@ gradlePlugin {
}
}
dependencies
{
dependencies
{
implementation
(
"org.eclipse.jgit:org.eclipse.jgit:5.1
0.0.202012080955
-r"
)
implementation
(
"org.eclipse.jgit:org.eclipse.jgit:5.1
2.0.202106070339
-r"
)
}
}
gradle/wrapper/gradle-wrapper.jar
View file @
68fbdd47
This diff was suppressed by a .gitattributes entry.
gradle/wrapper/gradle-wrapper.properties
View file @
68fbdd47
...
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
...
@@ -3,4 +3,4 @@ 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-7.
0.
2-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-7.2-all.zip
gradlew
View file @
68fbdd47
This diff is collapsed.
Click to expand it.
stub/build.gradle.kts
View file @
68fbdd47
...
@@ -35,6 +35,5 @@ android {
...
@@ -35,6 +35,5 @@ android {
}
}
dependencies
{
dependencies
{
implementation
(
fileTree
(
mapOf
(
"dir"
to
"libs"
,
"include"
to
listOf
(
"*.jar"
))))
implementation
(
project
(
":app:shared"
))
implementation
(
project
(
":app:shared"
))
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment