Marko Mitic
05/07/2019, 11:34 AMcompanion object {
const val TAG1 = this.javaClass.simpleName
const val TAG2 = MainActivity::class.simpleName!!
}
Obfuscation mangles class names so having them assigned to constants before obfuscation pass would be greatly useful.
(Or is there a way to this that I'm missing)nulldev
05/07/2019, 1:07 PMMarko Mitic
05/07/2019, 2:01 PMconst
and they will be obfuscatedProperties the value of which is known at compile time can be marked as compile time constants using theObfuscation is done post-compilation, so `const val`s should have non-obfuscated names and `val`s should have obfusacted names. Am I getting this right?modifierconst
karelpeeters
05/07/2019, 2:20 PMconst
qualifier to not actually change the value of things.Marko Mitic
05/07/2019, 2:28 PMvar
karelpeeters
05/07/2019, 2:28 PMMarko Mitic
05/07/2019, 2:30 PMconst
should be used? Other than optimizationsnulldev
05/07/2019, 3:17 PMconst
is only used as an optimization. It should never change the variable value.Marko Mitic
05/07/2019, 3:42 PMconst
isn't changing the value, it's the obfuscator. const
just inlines the value as the documentation says.