Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Artifact `symbol-processing` is relocated so as to be loadable by
`kotlin-compiler-embeddable`. To be able to work with `kotlin-compiler`,
e.g., in command line or K/N, an unrelocated `symbol-processing-cmdline`
is needed.
|
|
This PR adds a testing infra for the gradle plugin and also
adds support for android variants.
|
|
|
|
ShadowJar picks up the `compile` configuration by default and pulls
stdlib in (when using `from` without changing `configurations`).
|
|
To be able to do composite build, KSP depends on kotlin-compiler rather
than kotlin-compiler-embeddable and uses ShadowJar to relocate some
symbols. Unfortunately, ShadowJar doesn't seem able to relocate the jar
only and generate proper dependencies in the POM. As a workaround, this
commit hard-coded the dependencies.
|
|
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")
* Still needs to have google as a plugin repository.
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 to
enable 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 what
AGP does (com.android.application). This way, we can publish the marker
artifact in the KSP group.
I've made a couple more changes:
* Updated gradle to 6.6.1, which is the version kotlin uses
* Moved publishing setup to the main gradle file to configure common
things (pom, version etc)
* Moved the Jar manifest configuration to the main build file so that
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 an
will be removed in 7.
* Added an `outRepo` command line argument to set the repository
location for publication. It is handy when testing with a local build.
Fixes: #203
|
|
|
|
|
|
Change-Id: I06b529a2d5fbc8a3fff8323f6d0ae596589b3d68
|
|
|
|
|
|
|
|
|
|
|