Add kotlin-native/tools/degrade -- a helper for K/N Gradle builds

Intended to be helpful in minimizing reproducers or investigating
Kotlin/Native-related problems.

It analyses kotlin-multiplatform Gradle plugin events,
and creates shell scripts that run executed Kotlin/Native tools
(compiler, cinterop) without Gradle.
This commit is contained in:
Svyatoslav Scherbina
2021-10-06 09:48:16 +00:00
committed by Space
parent 6bfa710e34
commit bc01676489
4 changed files with 206 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# degrade
`degrade` is a tool that analyses kotlin-multiplatform Gradle plugin events,
and creates shell scripts that run executed Kotlin/Native tools (compiler, cinterop)
without Gradle.
Intended to be helpful in minimizing reproducers or investigating
Kotlin/Native-related problems.
Confirmed to work with Kotlin versions from 1.5.10 to 1.6.0-M1.
Probably doesn't work on Windows.
## Usage
```
degrade <your usual Gradle invocation>
```
for example, in a Gradle project directory
```
degrade ./gradlew build
```
The tool runs Gradle build, analyses certain events during the run,
and generates shell scripts in the `degrade` directory at the project root.
It emits a script per Kotlin/Native task, and also `rerun-all.sh` and
`rerun-failed.sh`.