Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This CL updates the build to properly publish the gradle
plugin with an id to avoid the need to modify settings
gradle.
After this change, we'll have the following 4 artifacts:
symbol-processing-api: same as before
symbol-processing: does not include the the gradle-plugin anymore
symbol-processing-gradle-plugin: the gradle plugin
com.google.devtools.ksp.gradle.plugin: gradle plugin marker artifact
After this change, developer can enable KSP by:
id("com.google.devtools.ksp")
The gradle plugin publishing model requires publishing a marker artifact
so that Gradle can find the main plugin artifact.
I've added
java-gradle-plugin
plugin to the gradle-plugin module toenable publishing. Unfortunately, it does have a validation step which
fails while traversing kotlin classes in the classpath so I had to
disable it. We can enable it once gradle depends on kotlin 1.4.
As part of this, I've removed the gradle plugin from the
symbol-processing artifact. Instead, it is now published as
symbol-processing-gradle-plugin artifact (it is consistent with the
project's and androidx's naming scheme but open to changes).
For plugin id, I couldn't use symbol-processing because that would
require us to publish an artifact with symbol-processing group.
Instead, I've picked
com.google.devtools.ksp
which seems close to whatAGP does (com.android.application). This way, we can publish the marker
artifact in the KSP group.
I've made a couple more changes:
things (pom, version etc)
all artifacts have it (was also a necessary change after unbundling the
gradle plugin since it uses that information to find the version).
Had to remove
Implementation-Title
as archiveBaseName is depreacted anwill be removed in 7.
outRepo
command line argument to set the repositorylocation for publication. It is handy when testing with a local build.
Fixes: #203