We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Contributions to this project must be accompanied by a Contributor License Agreement (CLA). You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you‘ve already submitted one (even if it was for a different project), you probably don’t need to do it again.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
This project follows Google's Open Source Community Guidelines.
For changes that involves API changes(new API, API signature change), please also update api.base file. You can monitor api change with ./gradlew :api:apiCheck
, and./gradlew :api:updateApi
to generate new api signature.
For incoming PRs, we would like to request changes covered by tests for good practice. We do end-to-end test for KSP, which means you need to write a lightweight processor to be loaded with KSP for testing. The form of the test itself is flexible as long as the logic is being covered.
Here are some sample test processors for your reference.
// WITH_RUNTIME
to the top if you need access to standard library.// TEST PROCESSOR:<Your test processor name>
to provide the test processor for this test case. Processors can be reused if necessary.//
(with a space after //)// END
to indicate end of expected test result.// FILE: <file name>
to create files that will be available at run time of the test.// FILE: a.kt
will result in a file named a.kt
at run time.:compiler-plugin:test
gradle task.--tests "com.google.devtools.ksp.test.KotlinKSPTestGenerated.<name of your generated test>"