From a34cdded9fb5fe7aef0d7ef2e59edeb8ffd4cabe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Feb 2026 13:34:58 +0000 Subject: [PATCH 1/8] Initial plan From 03bc631db7aa1151b3de9583e37b45ad4acea3fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Feb 2026 13:36:54 +0000 Subject: [PATCH 2/8] Add CONTRIBUTING.md with development commands and contribution guidelines Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com> --- CONTRIBUTING.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..33a8c4153 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,74 @@ +# Contributing to Shadow + +Thank you for considering contributing to the Shadow Gradle plugin! This document provides guidelines and information to help you get started. + +## Development Commands + +### Code Style + +Shadow uses [Spotless](https://github.com/diffplug/spotless) to maintain consistent code formatting. + +- **Check code style**: `./gradlew spotlessCheck` +- **Format code**: `./gradlew spotlessFormat` + +Please ensure your code is properly formatted before submitting a pull request. + +### Testing + +Shadow has multiple test suites to ensure code quality: + +- **Unit tests**: `./gradlew test` +- **Documentation tests**: `./gradlew documentTest` - Tests code snippets in the `./docs` directory +- **Functional/Integration tests**: `./gradlew functionalTest` + +Make sure all tests pass before submitting your changes. + +### API Compatibility + +Shadow uses Kotlin's [binary compatibility validator](https://github.com/Kotlin/binary-compatibility-validator) to track public API changes. + +- **Check API dumps**: `./gradlew checkKotlinAbi` +- **Update API dumps**: `./gradlew updateKotlinAbi` + +If you add or modify public APIs, you'll need to update the API dump files. + +### Linting + +Shadow uses [Android Lint](https://developer.android.com/studio/write/lint) to catch potential issues. + +- **Run lint checks**: `./gradlew lint` +- **Update lint baseline**: `./gradlew updateLintBaseline` + +## Contribution Guidelines + +### Fixing Issues + +When fixing bugs or issues: + +1. Ensure all existing tests pass +2. Add regression tests that verify the fix for the reported issue +3. Run the full test suite to ensure no unintended side effects +4. Update documentation if the fix changes behavior + +### Adding New Features or APIs + +When adding new features or public APIs: + +1. Ensure proper visibility modifiers are used +2. All public APIs must be documented with KDoc comments +3. Run `./gradlew updateKotlinAbi` to update the API dump files +4. Add appropriate tests for the new functionality +5. Update the documentation in the `./docs` directory if applicable + +### Before Submitting a Pull Request + +1. Run `./gradlew spotlessFormat` to format your code +2. Run `./gradlew spotlessCheck` to verify formatting +3. Run all test suites: `./gradlew test documentTest functionalTest` +4. Run `./gradlew checkKotlinAbi` to ensure API compatibility +5. Run `./gradlew lint` to check for potential issues +6. Ensure your commit messages are clear and descriptive + +## Questions? + +If you have questions or need help, feel free to open an issue or discussion on the [GitHub repository](https://github.com/GradleUp/shadow). From 2d86d1e36da4c88cfe1b8fbaaaf5131285c93839 Mon Sep 17 00:00:00 2001 From: Zongle Wang Date: Fri, 13 Feb 2026 21:38:16 +0800 Subject: [PATCH 3/8] Delete .github/CONTRIBUTING.md --- .github/CONTRIBUTING.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .github/CONTRIBUTING.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index 7abbcca76..000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ -# Contributing to Shadow Gradle Plugin - -Thank you for considering contributing From 63ffc33393d344f2575093aa9e19c3cee8b790fe Mon Sep 17 00:00:00 2001 From: Zongle Wang Date: Fri, 13 Feb 2026 21:41:29 +0800 Subject: [PATCH 4/8] Apply suggestions from code review --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33a8c4153..bf93172f7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,7 +67,8 @@ When adding new features or public APIs: 3. Run all test suites: `./gradlew test documentTest functionalTest` 4. Run `./gradlew checkKotlinAbi` to ensure API compatibility 5. Run `./gradlew lint` to check for potential issues -6. Ensure your commit messages are clear and descriptive +6. Or just run `./gradlew build` for depending on the tasks above +7. Ensure your commit messages are clear and descriptive ## Questions? From 9b0df79545b8c8e98d1f2d42b6647eb4a7c42946 Mon Sep 17 00:00:00 2001 From: Zongle Wang Date: Fri, 13 Feb 2026 21:41:43 +0800 Subject: [PATCH 5/8] Update CONTRIBUTING.md --- CONTRIBUTING.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf93172f7..c2b825baa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -70,6 +70,3 @@ When adding new features or public APIs: 6. Or just run `./gradlew build` for depending on the tasks above 7. Ensure your commit messages are clear and descriptive -## Questions? - -If you have questions or need help, feel free to open an issue or discussion on the [GitHub repository](https://github.com/GradleUp/shadow). From cad67cfca43c635603c6472d0af826d6c3603d04 Mon Sep 17 00:00:00 2001 From: Zongle Wang Date: Fri, 13 Feb 2026 21:48:13 +0800 Subject: [PATCH 6/8] Apply suggestions from code review --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c2b825baa..b18d11af2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ Make sure all tests pass before submitting your changes. ### API Compatibility -Shadow uses Kotlin's [binary compatibility validator](https://github.com/Kotlin/binary-compatibility-validator) to track public API changes. +Shadow uses Kotlin's [binary compatibility validator](https://kotlinlang.org/docs/gradle-binary-compatibility-validation.html) to track public API changes. - **Check API dumps**: `./gradlew checkKotlinAbi` - **Update API dumps**: `./gradlew updateKotlinAbi` From b080055e3cd628744400e0c3fbf557fddb9840ea Mon Sep 17 00:00:00 2001 From: Zongle Wang Date: Fri, 13 Feb 2026 21:48:28 +0800 Subject: [PATCH 7/8] Update CONTRIBUTING.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b18d11af2..bab7e4341 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,6 +67,6 @@ When adding new features or public APIs: 3. Run all test suites: `./gradlew test documentTest functionalTest` 4. Run `./gradlew checkKotlinAbi` to ensure API compatibility 5. Run `./gradlew lint` to check for potential issues -6. Or just run `./gradlew build` for depending on the tasks above +6. Optionally, run `./gradlew build` to run compilation, tests, and standard verification tasks configured for the project 7. Ensure your commit messages are clear and descriptive From 0a5441f63cb96461faa5e6e105de2d7c4030b9d7 Mon Sep 17 00:00:00 2001 From: Zongle Wang Date: Fri, 13 Feb 2026 21:49:13 +0800 Subject: [PATCH 8/8] Add agent guidelines for contributing to the repository --- AGENTS.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..83cc35c3b --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,9 @@ +# Agent Guidelines + +To understand how to contribute code, format commits, and run tests for this repository, +please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file. + +**Instructions for AI Agents:** +1. Read `CONTRIBUTING.md` before suggesting any code changes. +2. Adhere to the coding standards and PR templates defined therein. +3. Follow the environment setup steps to verify your proposed fixes.