Мне нужно передать параметр в мою конфигурацию proguard. В этом случае параметр представляет версию программы, которую необходимо запутать. Это мой файл конфигурации:
-injars 'C:\Users\jmurray\Desktop\OBF\MyProgram\MyProgram-1.0.0-RELEASE\MyProgram-1.0.0-RELEASE.jar'
-outjars 'C:\Users\jmurray\Desktop\OBF\MyProgram\MyProgram-1.0.0-RELEASE\MyProgram-1.0.0-RELEASE-OBF.jar'
-libraryjars 'C:\Program Files\Java\jdk-11\jmods\java.base.jmod'
-libraryjars 'C:\Program Files\Java\jdk-11\jmods\java.desktop.jmod'
-libraryjars 'C:\Program Files\Java\jdk-11\jmods\java.datatransfer.jmod'
-libraryjars 'C:\Users\jmurray\Desktop\OBF\MyProgram\MyProgram-1.0.0-RELEASE\lib'
-dontusemixedcaseclassnames
-dontnote
-dontwarn
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { *; }
##---------------End: proguard configuration for Gson ----------
-keep public class com.jmurray.MyProgram.main.* {
public ;
public ;
}
Как видите, версия (1.0.0-RELEASE) жестко запрограммирована в файле конфигурации. Мне нужно передать его снаружи
Мне нужно передать параметр в мою конфигурацию proguard. В этом случае параметр представляет версию программы, которую необходимо запутать. Это мой файл конфигурации: [code]-injars 'C:\Users\jmurray\Desktop\OBF\MyProgram\MyProgram-1.0.0-RELEASE\MyProgram-1.0.0-RELEASE.jar' -outjars 'C:\Users\jmurray\Desktop\OBF\MyProgram\MyProgram-1.0.0-RELEASE\MyProgram-1.0.0-RELEASE-OBF.jar'
##---------------Begin: proguard configuration for Gson ---------- # Gson uses generic type information stored in a class file when working with fields. Proguard # removes such information by default, so configure it to keep all of it. -keepattributes Signature
# For using GSON @Expose annotation -keepattributes *Annotation*
# Gson specific classes -keep class sun.misc.Unsafe { *; } #-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson -keep class com.google.gson.examples.android.model.** { *; }
##---------------End: proguard configuration for Gson ----------
-keep public class com.jmurray.MyProgram.main.* { public ; public ; } [/code] Как видите, версия (1.0.0-RELEASE) жестко запрограммирована в файле конфигурации. Мне нужно передать его снаружи