-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pack util module into symbol-processing-cmdline artifact
- Loading branch information
Showing
11 changed files
with
67 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
val kotlinBaseVersion: String by project | ||
val signingKey: String? by project | ||
val signingPassword: String? by project | ||
|
||
plugins { | ||
kotlin("jvm") | ||
id("com.github.johnrengelman.shadow") version "6.0.0" | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
val packedJars by configurations.creating | ||
|
||
dependencies { | ||
packedJars(project(":compiler-plugin")) { isTransitive = false } | ||
packedJars(project(":common-util")) { isTransitive = false } | ||
} | ||
|
||
tasks.withType<ShadowJar>() { | ||
archiveClassifier.set("") | ||
// ShadowJar picks up the `compile` configuration by default and pulls stdlib in. | ||
// Therefore, specifying another configuration instead. | ||
configurations = listOf(packedJars) | ||
} | ||
|
||
tasks { | ||
publish { | ||
dependsOn(shadowJar) | ||
dependsOn(project(":compiler-plugin").tasks["dokkaJavadocJar"]) | ||
} | ||
|
||
val sourcesJar by creating(Jar::class) { | ||
archiveClassifier.set("sources") | ||
from(project(":compiler-plugin").sourceSets.main.get().allSource) | ||
from(project(":common-util").sourceSets.main.get().allSource) | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("shadow") { | ||
artifactId = "symbol-processing-cmdline" | ||
artifact(tasks["sourcesJar"]) | ||
artifact(project(":compiler-plugin").tasks["dokkaJavadocJar"]) | ||
artifact(tasks["shadowJar"]) | ||
pom { | ||
name.set("com.google.devtools.ksp:symbol-processing-cmdline") | ||
description.set("Symbol processing for K/N and command line") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
isRequired = hasProperty("signingKey") && !gradle.taskGraph.hasTask("publishToMavenLocal") | ||
sign(extensions.getByType<PublishingExtension>().publications) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters