-
Notifications
You must be signed in to change notification settings - Fork 0
🎼 Simply the setup by only requiring the Gradle plugin import #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3e68649 to
1e0d215
Compare
Introduced functionality to auto-configure KSP and manage dependencies for JVM, KMP, and Android projects in the tech debt Gradle plugin. Enhanced version handling and added extensive tests to verify behavior.
Streamlined the README by merging redundant sections, removing detailed dependency configurations, and reorganizing setup steps for clarity.
c0db1ca to
dbdb4f7
Compare
Split the `sample` module into distinct submodules: `sample-jvm`, `sample-android`, and `sample-kmp`. Configured Gradle files for each submodule with appropriate plugins and dependencies. Updated settings and README for the new structure.
dbdb4f7 to
38dc78b
Compare
Implemented a GitHub Actions workflow to automate the generation and verification of Tech Debt reports for Android, KMP, and JVM samples.
Replaced hardcoded strings with named constants for plugin and dependency configurations in `TechDebtPlugin.kt`, improving maintainability and readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR simplifies the setup process for the TechDebt Gradle plugin by automatically applying the KSP plugin and adding the required dependencies when the plugin is applied. Users no longer need to manually configure KSP or add techdebt-processor and techdebt-annotations dependencies.
Changes:
- Automatic KSP plugin application and dependency injection for JVM, Android, and Kotlin Multiplatform projects
- Version resolution mechanism via generated properties file
- Reorganized sample projects into separate modules for JVM, Android, and KMP
- Updated documentation to reflect simplified setup
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| techdebt-gradle-plugin/src/main/kotlin/com/escodro/techdebt/gradle/TechDebtPlugin.kt | Added automatic plugin application and dependency injection logic for different project types (Android, KMP, JVM) |
| techdebt-gradle-plugin/build.gradle.kts | Changed KSP and Android Gradle Plugin dependencies from compileOnly to implementation; added version generation task |
| techdebt-gradle-plugin/src/test/kotlin/com/escodro/techdebt/gradle/TechDebtPluginTest.kt | Added comprehensive tests for automatic plugin/dependency configuration across project types |
| settings.gradle.kts | Added dependency resolution management and reorganized sample module includes |
| samples/sample-jvm/build.gradle.kts | New JVM sample demonstrating simplified plugin setup |
| samples/sample-android/build.gradle.kts | New Android sample demonstrating simplified plugin setup |
| samples/sample-kmp/build.gradle.kts | New KMP sample demonstrating simplified plugin setup |
| sample/build.gradle.kts | Removed old sample module with manual dependency configuration |
| gradle/libs.versions.toml | Added Android Gradle Plugin version and plugin declarations |
| gradle.properties | Increased Gradle JVM heap size to 8GB |
| local.properties | Added Android SDK path (should not be committed) |
| README.md | Updated documentation to remove manual dependency setup instructions |
| .github/workflows/report_tests.yml | Added CI workflow to verify report generation for all sample types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
techdebt-gradle-plugin/src/main/kotlin/com/escodro/techdebt/gradle/TechDebtPlugin.kt
Outdated
Show resolved
Hide resolved
techdebt-gradle-plugin/src/main/kotlin/com/escodro/techdebt/gradle/TechDebtPlugin.kt
Outdated
Show resolved
Hide resolved
techdebt-gradle-plugin/src/main/kotlin/com/escodro/techdebt/gradle/TechDebtPlugin.kt
Show resolved
Hide resolved
techdebt-gradle-plugin/src/test/kotlin/com/escodro/techdebt/gradle/TechDebtPluginTest.kt
Outdated
Show resolved
Hide resolved
techdebt-gradle-plugin/src/main/kotlin/com/escodro/techdebt/gradle/TechDebtPlugin.kt
Outdated
Show resolved
Hide resolved
techdebt-gradle-plugin/src/main/kotlin/com/escodro/techdebt/gradle/TechDebtPlugin.kt
Outdated
Show resolved
Hide resolved
techdebt-gradle-plugin/src/main/kotlin/com/escodro/techdebt/gradle/TechDebtPlugin.kt
Outdated
Show resolved
Hide resolved
….gitignore Deleted `local.properties`, reduced `org.gradle.jvmargs` from 8g to 4g in `gradle.properties`, and added `local.properties` to `.gitignore` for better version control and cleaner repository setup.
Integrated Detekt and Ktfmt plugins into the Gradle build to enforce code quality and formatting standards. Updated tasks to depend on these checks and set up custom Detekt configurations.
Refined version retrieval by validating and explicitly checking for blank values. Added logging to warn when `techdebt.properties` is missing, ensuring better debugging and clearer error messages.
Updated the error message in `TechDebtPluginTest` to correctly interpolate the `moduleName` argument, improving clarity and consistency.
Enhanced `TechDebtPlugin` to handle cases where specific KSP target configurations are missing by falling back to the general `ksp` configuration. Added a test to verify the fallback logic.
becc77a to
780c7ee
Compare
After investigating other libraries, such as Metro, I noticed that some projects only require the Gradle plugin to be imported. This PR aims to automatically add the required dependencies via the Gradle plugin and streamline the setup.