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
b68658e9
Commit
b68658e9
authored
Jun 19, 2022
by
vvb2060
Committed by
John Wu
Jun 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebuild manifest
parent
3ae73447
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Setup.kt
buildSrc/src/main/java/Setup.kt
+4
-4
No files found.
buildSrc/src/main/java/Setup.kt
View file @
b68658e9
...
...
@@ -21,9 +21,11 @@ import java.io.ByteArrayInputStream
import
java.io.ByteArrayOutputStream
import
java.io.File
import
java.io.PrintStream
import
java.nio.file.Files
import
java.security.KeyStore
import
java.security.cert.X509Certificate
import
java.util.*
import
java.util.jar.JarFile
import
java.util.zip.*
private
fun
Project
.
androidBase
(
configure
:
Action
<
BaseExtension
>)
=
...
...
@@ -90,6 +92,7 @@ private fun addComment(apkPath: File, signConfig: SigningConfig, minSdk: Int, eo
SigningExtension
(
signingOptions
).
register
(
it
)
it
.
eocdComment
=
eocdComment
.
toByteArray
()
it
.
get
(
IncrementalPackager
.
APP_METADATA_ENTRY_PATH
)
?.
delete
()
it
.
get
(
JarFile
.
MANIFEST_NAME
)
?.
delete
()
}
}
...
...
@@ -133,11 +136,8 @@ private fun Project.setupAppCommon() {
android
.
applicationVariants
.
all
{
val
projectName
=
project
.
name
.
toLowerCase
(
Locale
.
ROOT
)
val
variantCapped
=
name
.
capitalize
(
Locale
.
ROOT
)
val
variant
=
name
.
toLowerCase
(
Locale
.
ROOT
)
tasks
.
getByPath
(
":$projectName:package$variantCapped"
).
doLast
{
val
apkDir
=
if
(
properties
[
"android.injected.invoked.from.ide"
]
==
"true"
)
"intermediates"
else
"outputs"
val
apk
=
File
(
buildDir
,
"${apkDir}/apk/${variant}/$projectName-${variant}.apk"
)
val
apk
=
outputs
.
files
.
asFileTree
.
filter
{
it
.
name
.
endsWith
(
".apk"
)
}.
singleFile
val
comment
=
"version=${Config.version}\nversionCode=${Config.versionCode}"
addComment
(
apk
,
signingConfig
,
android
.
defaultConfig
.
minSdk
!!
,
comment
)
}
...
...
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