Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
echo "GPG Key present: ${{ secrets.MAVEN_GPG_PRIVATE_KEY != '' }}"
echo "GPG Passphrase present: ${{ secrets.MAVEN_GPG_PASSPHRASE != '' }}"
echo "Version: ${{ steps.version.outputs.version }}"

- run: sed -i "s/\"1.3.0\"/\"${{ steps.version.outputs.version }}\"/g" gradle-plugin/src/main/kotlin/net/kigawa/renlin/RenlinCompilerPlugin.kt
- name: Publish package
run: >
./gradlew
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class RenlinCompilerPlugin : KotlinCompilerPluginSupportPlugin {
// Kotlinコンパイラプラグインの実装部アーティファクトを返す
override fun getPluginArtifact(): SubpluginArtifact {
return SubpluginArtifact(
groupId = "net.kigawa",
artifactId = "kotlin-plugin",
groupId = "net.kigawa.renlin-compiler",
artifactId = "renlin-kotlin-plugin",
version = "1.3.0",
)
}
Expand Down
65 changes: 63 additions & 2 deletions kotlin-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import com.vanniktech.maven.publish.SonatypeHost
plugins {
kotlin("multiplatform")
application
signing
id("com.vanniktech.maven.publish") version "0.29.0"
}

group = "net.kigawa"
version = "1.3.0"

repositories {
gradlePluginPortal()
mavenCentral()
Expand Down Expand Up @@ -66,3 +68,62 @@ kotlin {
}




publishing {
// Configure all publications
publications.withType<MavenPublication> {
pom {
artifactId = "renlin-kotlin-plugin"
name.set("net.kigawa.renlin-compiler.gradle.plugin")
description.set("Kotlin Compiler Plugin for automatic value injection with @AutoFill annotation")
url.set("https://github.com/Code-Sakura/renlin-compiler")
properties.set(
mapOf(
)
)
licenses {
license {
name.set("MIT License")
url.set("http://www.opensource.org/licenses/mit-license.php")
}
}
developers {
developer {
id.set("net.kigawa")
name.set("kigawa")
email.set("[email protected]")
}
developer {
id.set("io.github.seizavl")
name.set("seizavl")
email.set("")
}
}
scm {
connection.set("scm:git:https://github.com/Code-Sakura/renlin-compiler.git")
developerConnection.set("scm:git:https://github.com/Code-Sakura/renlin-compiler.git")
url.set("https://github.com/Code-Sakura/renlin-compiler")
}
}
}
}

signing {
if (project.hasProperty("mavenCentralUsername") ||
System.getenv("ORG_GRADLE_PROJECT_mavenCentralUsername") != null
) {
useGpgCmd()
// It is not perfect (fails at some dependency assertions), better handled as
// `signAllPublications()` (as in vanniktech maven publish plugin) at build.gradle.kts.
//sign(publishing.publications)
}
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
if (project.hasProperty("mavenCentralUsername") ||
System.getenv("ORG_GRADLE_PROJECT_mavenCentralUsername") != null
)
signAllPublications()
}