This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
forked from soarn/bluestone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproguard-rules.pro
144 lines (110 loc) · 4.32 KB
/
proguard-rules.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Bluestone Java Discord bot: ProGuard rules
# Library
-libraryjars <java.home>/lib/rt.jar
-libraryjars <java.home>/lib/jce.jar
# Optimization
-optimizations *
-optimizationpasses 5
-allowaccessmodification
-dontoptimize
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
# Mappings
-printmapping mapping.txt
# Reflection
-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod
# Native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames,includedescriptorclasses class * {
native <methods>;
}
# Enums, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers,allowoptimization enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
# Stack traces
-keepattributes SourceFile,LineNumberTable
# OkHttp
-keepattributes Signature
-keepattributes *Annotation*
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
-dontwarn okhttp3.internal.platform.ConscryptPlatform
# META-INF/versions/9: Java 9 alternate classes
-ignorewarnings
# Main class
-keep class com.kdrag0n.bluestone.Bootstrap { *; }
# SLF4J
-keep class org.slf4j.** { *; }
-dontwarn org.slf4j.MDC # MDC binder
-dontwarn org.slf4j.MarkerFactory # Marker binder
# Antlr
-dontwarn org.antlr.runtime.tree.DOTTreeGenerator # Antlr string template library
# Ical4j
-dontwarn net.fortuna.ical4j.model.** # Groovy
# Javassist
-dontwarn javassist.util.HotSwapper* # Sun JDI JVM utilities
# JSR-223 scripting engines
-keep class org.codehaus.groovy.jsr223.GroovyScriptEngineFactory { *; }
# Sentry
-keep class io.sentry.** { *; }
-dontwarn io.sentry.servlet.SentryServlet* # JavaX servlet
-dontwarn io.sentry.event.interfaces.HttpInterface # JavaX servlet
-dontwarn io.sentry.event.helper.** # JavaX servlet HTTP request
# Jackson (indirect dependency)
-keep class com.fasterxml.jackson.core.JsonFactory { *; }
-keep class com.fasterxml.jackson.databind.ObjectMapper { *; }
# JDBC
-keep class org.h2.Driver { *; }
-keep class org.mariadb.jdbc.Driver { *; }
# MariaDB
-keep class org.mariadb.jdbc.** { *; }
-dontwarn org.mariadb.jdbc.integration.** # C3P0, JBoss
# ORM models
-keep class com.kdrag0n.bluestone.sql.** { *; }
# HikariCP
-keep class com.zaxxer.hikari.** { *; }
-dontwarn com.zaxxer.hikari.pool.HikariPool # Codehale & Micrometer metrics
-dontwarn com.zaxxer.hikari.metrics.** # Prometheus, Micrometer, Dropwizard metrics
-dontwarn com.zaxxer.hikari.hibernate.** # Hibernate ORM
-dontwarn com.zaxxer.hikari.HikariConfig # Codehale Dropwizard metrics
# ORMLite
-keepnames class com.j256.ormlite.table.TableUtils
-keepnames class com.j256.ormlite.table.DatabaseTableConfig
-keep class com.j256.ormlite.logger.** { *; }
-dontwarn com.j256.ormlite.misc.JavaxPersistenceImpl # JavaX persistence annotations
-dontwarn com.j256.ormlite.logger.Log4jLog # Old Log4j
# Serializable
-keepnames class * implements java.io.Serializable
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
!private <fields>;
!private <methods>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
# Modules
-keep class com.kdrag0n.bluestone.modules.** { *; }
-dontwarn com.kdrag0n.bluestone.modules.ReplModule # Nashorn JS engine
-dontwarn com.kdrag0n.bluestone.modules.OwnerModule # Nashorn JS engine
# Reflections
-dontwarn org.reflections.** # Dom4J
# H2 Database
-dontwarn org.h2.** # OSGI, locationtech jts, javax servlet, Apache Lucene, etc
# ImageIO
-dontwarn com.twelvemonkeys.image.Magick* # ImageMagick bindings
# Handlers
-keep class com.kdrag0n.bluestone.handlers.SentryFilter.** { *; }