Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/udalov/kotlin-obfuscation-test-app
An example Kotlin application, which can be used as a test for bytecode obfuscation tools
https://github.com/udalov/kotlin-obfuscation-test-app
Last synced: 6 days ago
JSON representation
An example Kotlin application, which can be used as a test for bytecode obfuscation tools
- Host: GitHub
- URL: https://github.com/udalov/kotlin-obfuscation-test-app
- Owner: udalov
- Created: 2018-05-29T11:45:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-17T20:47:59.000Z (almost 3 years ago)
- Last Synced: 2024-10-24T22:35:39.737Z (about 2 months ago)
- Language: Kotlin
- Size: 396 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# kotlin-obfuscation-test-app
This project provides an example application that uses Kotlin reflection, which can be used as a test for bytecode obfuscation tools. Since Kotlin reflection relies heavily on the contents of the `@kotlin.Metadata` annotation generated on .class files produced by the Kotlin compiler, changing the bytecode without adapting the `@kotlin.Metadata` annotation contents is very likely to break Kotlin reflection.
At the moment, this project consists of the majority of tests on reflection [from the main Kotlin repo](https://github.com/JetBrains/kotlin/tree/master/compiler/testData/codegen/box/reflection). Run with:
./gradlew clean build
java -jar build/libs/kotlin-obfuscation-test-app-1.0-SNAPSHOT-all.jar(substitute `./gradlew` with `gradlew` on Windows)
The application will run each of the tests, printing "OK" if succeeded, or the error message if not. At the end, the total number of passed tests is printed:
annotations.annotationRetentionAnnotation: OK
annotations.findAnnotation: OK
annotations.genericExtensionProperty: OK
...
types.subtyping.typeProjection: OK
types.typeArguments: OK
types.useSiteVariance: OK
328/328 tests passed