Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ac7cf9f
newer gradle versions require java 17, keep sample processors at 11
hauner Aug 9, 2025
bdee8c0
migrate to kotlin
hauner Aug 9, 2025
c1eb7a6
migrate to kotlin
hauner Aug 9, 2025
d1f5435
migrate to kotlin, extract groovy dsl support
hauner Aug 9, 2025
adb6452
migrate to kotlin
hauner Aug 9, 2025
7ec5f18
update gradle version
hauner Aug 9, 2025
17573f7
compile groovy before kotlin
hauner Aug 9, 2025
230a8b4
find kotlin classes
hauner Aug 9, 2025
58aa5e0
clean up
hauner Aug 9, 2025
4115d78
compile static
hauner Aug 9, 2025
351497e
helper
hauner Aug 9, 2025
9e8cc3d
not needed
hauner Aug 9, 2025
1a5c2e7
update plugin description
hauner Aug 9, 2025
a5aa6ef
update compatibility
hauner Aug 9, 2025
8242ade
improve
hauner Aug 9, 2025
d5ae994
enable cache
hauner Aug 9, 2025
5ebf63f
compile convention plugin
hauner Aug 14, 2025
0f78997
avoid javadoc warnings
hauner Aug 14, 2025
662f022
better home for repositoriees
hauner Aug 14, 2025
f25b236
use compile plugin
hauner Aug 14, 2025
aef3c2b
add v2 processor dummy
hauner Aug 14, 2025
0beb20b
rework publishing
hauner Aug 14, 2025
11c344e
obsolete
hauner Aug 14, 2025
8ed7f77
fix publish task
hauner Aug 14, 2025
95619fd
drop old version plugin
hauner Aug 14, 2025
1b4405f
use new versions plugin
hauner Aug 14, 2025
e5066e8
clean up deprecated
hauner Aug 14, 2025
ef9a573
update publish configuration
hauner Aug 15, 2025
d347a0e
link processor task to compilation via output
hauner Aug 15, 2025
d9ad071
update build
hauner Aug 17, 2025
b1b5d60
update build
hauner Aug 17, 2025
f2aa247
clean up
hauner Sep 16, 2025
bb475b3
update
hauner Sep 16, 2025
8ee1820
update dependencies
hauner Sep 16, 2025
8f88430
update publishing
hauner Sep 16, 2025
5db6a23
kept for backward compatibility
hauner Sep 16, 2025
3131920
clean up
hauner Sep 16, 2025
4115b1e
update publishing
hauner Sep 16, 2025
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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
distribution: 'temurin'
java-version: |
17
11

- name: build & publish (sonatype)
env:
Expand All @@ -38,6 +37,6 @@ jobs:
ORG_GRADLE_PROJECT_signPwd: ${{ secrets.SIGN_PWD }}
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
PUBLISH_KEY: ${{ secrets.PUBLISH_KEY }}
run: ./gradlew build publishToSonatype -s
run: ./gradlew build publishToMavenCentral --stacktrace

# -i -d
72 changes: 28 additions & 44 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,43 +1,27 @@
plugins {
`kotlin-dsl`
id("signing")
id("openapiprocessor.version")
id("openapiprocessor.publish")
`maven-publish`
signing
alias(libs.plugins.pubplug)
alias(libs.plugins.publish)
alias(libs.plugins.nexus)
alias(libs.plugins.versions)
id("compile")
}

group = projectGroupId()
version = projectVersion()
extra["api"] = libs.versions.api.get()
group = "io.openapiprocessor"
version = libs.versions.project.get()

allprojects {
apply(plugin = "groovy")

repositories {
mavenCentral()

maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
content {
includeGroup("io.openapiprocessor")
}
mavenContent {
snapshotsOnly()
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
}
versions {
packageName = "io.openapiprocessor.gradle"
entries = mapOf(
"version" to libs.versions.project.get(),
"api" to libs.versions.api.get()
)
}

dependencies {
compileOnly(rootProject.libs.openapi.processor.api)
implementation(localGroovy())
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

Expand All @@ -46,7 +30,6 @@ java {
withSourcesJar()
}

@Suppress("UnstableApiUsage")
testing {
suites {
val test by getting(JvmTestSuite::class) {
Expand Down Expand Up @@ -75,9 +58,14 @@ testing {
}
}

//tasks.updateDaemonJvm {
// jvmVersion = JavaVersion.VERSION_17
//}
// compile groovy before kotlin
tasks.compileGroovy {
classpath = sourceSets.main.get().compileClasspath
}

tasks.compileKotlin {
libraries.from(sourceSets.main.get().groovy.classesDirectory)
}

tasks.named<Test>("testInt") {
shouldRunAfter(tasks.named("test"))
Expand Down Expand Up @@ -107,18 +95,14 @@ gradlePlugin {
create("processorPlugin") {
id = "io.openapiprocessor.openapi-processor"
displayName = "Gradle openapi-processor plugin"
description = "plugin to run openapi-processor-*, e.g. openapi-processor-spring (requires gradle 7.0+, with gradle 5.5+ use 2021.3)"
description = "plugin to run openapi-processor-*, e.g. openapi-processor-spring (requires gradle 7.2+)"
tags.set(listOf("openapi", "openapi-processor"))
implementationClass = "io.openapiprocessor.gradle.OpenApiProcessorPlugin"
}
}
}

nexusPublishing {
repositories {
sonatype {
username = getPublishUser()
password = getPublishKey()
}
}
publishingCentral {
deploymentName = "gradle"
waitFor = "VALIDATED"
}
17 changes: 0 additions & 17 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,7 @@ plugins {
`kotlin-dsl`
}

repositories {
mavenCentral()
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}

dependencies {
// catalog hack: https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
// compileOnly(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}

gradlePlugin {
plugins {
create("VersionPlugin") {
id = "openapiprocessor.version"
implementationClass = "VersionPlugin"
}
}
}

22 changes: 22 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
rootProject.name = "buildSrc"

pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
// maven {
// url = uri("https://central.sonatype.com/repository/maven-snapshots")
// }
}
}

dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}

repositories {
mavenCentral()
// maven {
// url = uri("https://central.sonatype.com/repository/maven-snapshots")
// }
// maven {
// url = uri("https://plugins.gradle.org/m2/")
// }
}
}
42 changes: 0 additions & 42 deletions buildSrc/src/main/kotlin/Project.kt

This file was deleted.

42 changes: 0 additions & 42 deletions buildSrc/src/main/kotlin/VersionPlugin.kt

This file was deleted.

59 changes: 0 additions & 59 deletions buildSrc/src/main/kotlin/VersionTask.kt

This file was deleted.

10 changes: 10 additions & 0 deletions buildSrc/src/main/kotlin/compile.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// basic compile settings for project and subprojects

plugins {
groovy
}

dependencies {
compileOnly("io.openapiprocessor:openapi-processor-api:2024.2")
implementation(localGroovy())
}
Loading