Skip to content

Commit

Permalink
docs: plan some next changes
Browse files Browse the repository at this point in the history
Signed-off-by: Artyom Shendrik <artyom.shendrik@gmail.com>
  • Loading branch information
amal committed Feb 2, 2024
1 parent 9d87679 commit 06d5d78
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
11 changes: 6 additions & 5 deletions fluxo-kmp-conf/detekt-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ID>ForbiddenComment:AbstractShrinkerTask.kt$// FIXME: Before Java 9, the runtime classes were packaged in a single jar file.</ID>
<ID>ForbiddenComment:AbstractShrinkerTask.kt$// TODO: Move into a separate file, loaded from resources</ID>
<ID>ForbiddenComment:AbstractShrinkerTask.kt$AbstractShrinkerTask$// FIXME: Move mapping to the output dir?</ID>
<ID>ForbiddenComment:AbstractShrinkerTask.kt$AbstractShrinkerTask$// FIXME: Print the version of the bundled shrinker.</ID>
<ID>ForbiddenComment:AbstractShrinkerTask.kt$AbstractShrinkerTask$// FIXME: When java toolchain used or JDK target is specified, read the specified JDK.</ID>
<ID>ForbiddenComment:AbstractShrinkerTask.kt$AbstractShrinkerTask$// TODO: Automatic main class detection from jar manifest and/or project configuration</ID>
<ID>ForbiddenComment:AbstractShrinkerTask.kt$AbstractShrinkerTask$// TODO: Can be cached for a JDK.</ID>
Expand Down Expand Up @@ -45,13 +44,15 @@
<ID>ForbiddenComment:SetupAndroid.kt$// TODO: Test for libraries bytecode.</ID>
<ID>ForbiddenComment:SetupAndroidLint.kt$// TODO: Setup Lint for NonAndroid projects</ID>
<ID>ForbiddenComment:SetupAndroidSigning.kt$// TODO: Support for ENV variables instead of file for more straightforward CI/CD</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// FIXME: Allow to call shrinker by task name even if it's disabled.</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// FIXME: Publish the debug non-shrinked artifacts alongside the release shrinked ones.</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// FIXME: Run tests with minified artifacts.</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// FIXME: Support KMP JVM target minification with ProGuard.</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// FIXME: Support R8 or ProgGuard available in the classpath (bundled)</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// FIXME: Support auto-loading of the shrinkings rules from the classpath</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// TODO: Allow to call shrinker by task name even if it's disabled.</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// FIXME: Support auto-loading of the shrinking rules from the classpath for the ProGuard.</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// FIXME: Support double-shrinking with both R8 and ProGuard.</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// FIXME: Support shadow jar generation before shrinking artifacts.</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// TODO: Support Android minification with ProGuard?</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// TODO: Support disabling kotlin nullability checks generation for the shrinked release builds.</ID>
<ID>ForbiddenComment:SetupArtifactsShrinking.kt$// TODO: Support auto-disabling kotlin null checks generation for the shrinked release builds.</ID>
<ID>ForbiddenComment:SetupDetekt.kt$// FIXME: Disable non-resolving tasks if resolving version is available.</ID>
<ID>ForbiddenComment:SetupDetekt.kt$// FIXME: Setup the "InvalidPackageDeclaration" rule for each module,</ID>
<ID>ForbiddenComment:SetupDetekt.kt$// FIXME: Use kotlin settings directly from the linked kotlin compilation task?</ID>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,37 @@ import fluxo.shrink.registerShrinkerKeepRulesGenTask
import fluxo.shrink.registerShrinkerTask
import org.gradle.language.base.plugins.LifecycleBasePlugin.CHECK_TASK_NAME

// FIXME: Support double-shrinking with both R8 and ProGuard.
// Ensure the mapping file incrementality and compatibility.

// FIXME: Run tests with minified artifacts.
// https://github.com/ArcticLampyrid/gradle-git-version/blob/23ccfc8/build.gradle.kts#L72

// FIXME: Support R8 or ProgGuard available in the classpath (bundled)
// + notifyThatToolIsRunning
// https://github.com/tuuzed/LightTunnel/blob/680d3bc/buildSrc/src/main/kotlin/Compiler.kt

// FIXME: Support auto-loading of the shrinkings rules from the classpath
// FIXME: Support auto-loading of the shrinking rules from the classpath for the ProGuard.
// Should be reused from the Android ProGuard Gradle plugin.
// https://github.com/Kotlin/kotlinx.coroutines/tree/2ddcbe8/kotlinx-coroutines-core/jvm/resources/META-INF
// https://github.com/JetBrains/kotlin/tree/14b13a2/core/reflection.jvm/resources/META-INF/com.android.tools
// https://github.com/search?type=code&q=path%3AMETA-INF%2Fcom.android.tools%2Fr8**.pro
// https://github.com/search?type=code&q=path%3AMETA-INF%2F**.pro

// FIXME: Support KMP JVM target minification with ProGuard.

// TODO: Support disabling kotlin nullability checks generation for the shrinked release builds.
// TODO: Support auto-disabling kotlin null checks generation for the shrinked release builds.
// Auto-add assumenosideeffects to remove left intrinsics in that case.

// TODO: Support Android minification with ProGuard?
// FIXME: Publish the debug non-shrinked artifacts alongside the release shrinked ones.
// Should be easy to switch between them in the consuming projects.
// Use variant attributes?

// TODO: Allow to call shrinker by task name even if it's disabled.
// FIXME: Allow to call shrinker by task name even if it's disabled.
// Or, at least, show an informative warning when it's disabled

// FIXME: Support shadow jar generation before shrinking artifacts.
// https://github.com/GradleUp/gr8
// https://github.com/johnrengelman/shadow

// TODO: Support Android minification with ProGuard?

// region Notes and references:
// https://r8.googlesource.com/r8/
// https://r8-docs.preemptive.com/
Expand All @@ -41,9 +49,10 @@ import org.gradle.language.base.plugins.LifecycleBasePlugin.CHECK_TASK_NAME
// https://android.googlesource.com/platform/tools/base/+/0d60339/build-system/gradle-core/src/main/java/com/android/build/gradle/internal/tasks/R8Task.kt
// https://github.com/avito-tech/avito-android/blob/a1949b4/subprojects/assemble/proguard-guard/src/main/kotlin/com/avito/android/proguard_guard/shadowr8/ShadowR8TaskCreator.kt
// https://github.com/lowasser/kotlinx.coroutines/blob/fcaa6df/buildSrc/src/main/kotlin/RunR8.kt
// https://github.com/tuuzed/LightTunnel/blob/680d3bc/buildSrc/src/main/kotlin/Compiler.kt
//
// https://slackhq.github.io/keeper/
// https://github.com/slackhq/Keeper
// https://github.com/slackhq/Keeper
// https://github.com/open-obfuscator/dProtect
//
// ProGuard/R8 configuration improvements
Expand Down

0 comments on commit 06d5d78

Please sign in to comment.