Pre loader

Proguard rules

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

What are the Proguard rules for SciChart?
Does any of the charting/core/data/drawing component uses reflection?

Version
1.2.0
  • You must to post comments
1
0

Hi there,

As I’m aware of SciChart Android doesn’t use reflection which could cause problem with ProGuard minifacation process. So I think it just should work without any special rules for SciChart libraries.

Best regards,
Yura

  • abc def
    cant survive proguard, the error given: JNI DETECTED ERROR IN APPLICATION: java_class == null in call to GetMethodID from void com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.initialize()
  • You must to post comments
0
0

Hi abc def (what’s your name btw?)

I’ve attached our pro guard rules below. Does this help?

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:/Program Files/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# typical library config from http://proguard.sourceforge.net/manual/examples.html#library
-keepparameternames
-renamesourcefileattribute SourceFile
-keepattributes Exceptions,InnerClasses,Signature,Deprecated, SourceFile,LineNumberTable,*Annotation*,EnclosingMethod

# skip public classes + its protected and public methods, fields etc.
-keep public class * {
    public protected *;
}

# These methods are inserted by the javac compiler and the jikes compiler respectively, in JDK 1.2 and older, to implement the .class construct.
# ProGuard will automatically detect them and deal with them, even when their names have been obfuscated. However, other obfuscators may rely on the original method names.
# It may therefore be helpful to preserve them, in case these other obfuscators are ever used for further obfuscation of the library.
-keepclassmembernames class * {
    java.lang.Class class$(java.lang.String);
    java.lang.Class class$(java.lang.String, boolean);
}

# leave native methods - we need to save method's names to correctly call C++ code
-keepclasseswithmembernames,includedescriptorclasses class * {
    native <methods>;
}

# need to preserve some methods for enum classes
-keepclassmembers,allowoptimization enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}
  • abc def
    haha, my name is in my email addr. “abd def” was just to speed up registration process. Only made it work by applying this rule. -keep public class com.scichart.** { public protected *; }. had to keep everything, it seems native code accesses some java methods. e.g. Point2DSeries#setSize() method not found in native lib. I used proguard-android-optimize, probably it stripped it away.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies