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
c06081b7
Commit
c06081b7
authored
May 24, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more proguard restrictions and rules for kotlin and moshi
parent
a7eec2f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
1 deletion
+65
-1
build.gradle
app/build.gradle
+1
-1
proguard-kotlin.pro
app/proguard-kotlin.pro
+15
-0
proguard-moshi.pro
app/proguard-moshi.pro
+49
-0
No files found.
app/build.gradle
View file @
c06081b7
...
...
@@ -28,7 +28,7 @@ android {
buildTypes
{
release
{
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
,
'proguard-moshi.pro'
,
'proguard-kotlin.pro'
}
}
...
...
app/proguard-kotlin.pro
0 → 100644
View file @
c06081b7
-
dontusemixedcaseclassnames
-
keep
class
kotlin
.
**
{
*
;
}
-
keep
class
kotlin
.
Metadata
{
*
;
}
-
dontwarn
kotlin
.
**
-
keepclassmembers
class
kotlin
.
Metadata
{
public
<
methods
>
;
}
# Removes runtime null checks - doesn't really matter if it crashes on kotlin or java NPE
-
assumenosideeffects
class
kotlin
.
jvm
.
internal
.
Intrinsics
{
static
void
checkParameterIsNotNull
(
java
.
lang
.
Object
,
java
.
lang
.
String
);
}
# Useless option for dex
-
dontpreverify
\ No newline at end of file
app/proguard-moshi.pro
0 → 100644
View file @
c06081b7
# JSR 305 annotations are for embedding nullability information.
-
dontwarn
javax
.
annotation
.
**
-
keepclasseswithmembers
class
*
{
@
com
.
squareup
.
moshi
.
*
<
methods
>
;
}
-
keep
@
com
.
squareup
.
moshi
.
JsonQualifier
interface
*
# Enum field names are used by the integrated EnumJsonAdapter.
# Annotate enums with @JsonClass(generateAdapter = false) to use them with Moshi.
-
keepclassmembers
@
com
.
squareup
.
moshi
.
JsonClass
class
*
extends
java
.
lang
.
Enum
{
<
fields
>
;
}
# The name of @JsonClass types is used to look up the generated adapter.
-
keepnames
@
com
.
squareup
.
moshi
.
JsonClass
class
*
# Retain generated JsonAdapters if annotated type is retained.
-
if
@
com
.
squareup
.
moshi
.
JsonClass
class
*
-
keep
class
<
1
>
JsonAdapter
{
<
init
>
(...);
<
fields
>
;
}
-
if
@
com
.
squareup
.
moshi
.
JsonClass
class
**
$
*
-
keep
class
<
1
>
_
<
2
>
JsonAdapter
{
<
init
>
(...);
<
fields
>
;
}
-
if
@
com
.
squareup
.
moshi
.
JsonClass
class
**
$
*
$
*
-
keep
class
<
1
>
_
<
2
>
_
<
3
>
JsonAdapter
{
<
init
>
(...);
<
fields
>
;
}
-
if
@
com
.
squareup
.
moshi
.
JsonClass
class
**
$
*
$
*
$
*
-
keep
class
<
1
>
_
<
2
>
_
<
3
>
_
<
4
>
JsonAdapter
{
<
init
>
(...);
<
fields
>
;
}
-
if
@
com
.
squareup
.
moshi
.
JsonClass
class
**
$
*
$
*
$
*
$
*
-
keep
class
<
1
>
_
<
2
>
_
<
3
>
_
<
4
>
_
<
5
>
JsonAdapter
{
<
init
>
(...);
<
fields
>
;
}
-
if
@
com
.
squareup
.
moshi
.
JsonClass
class
**
$
*
$
*
$
*
$
*
$
*
-
keep
class
<
1
>
_
<
2
>
_
<
3
>
_
<
4
>
_
<
5
>
_
<
6
>
JsonAdapter
{
<
init
>
(...);
<
fields
>
;
}
\ No newline at end of file
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