|
1 | 1 | plugins { |
2 | 2 | `kotlin-dsl` |
3 | | - id("signing") |
4 | | - id("openapiprocessor.version") |
5 | | - id("openapiprocessor.publish") |
| 3 | + `maven-publish` |
| 4 | + signing |
| 5 | + alias(libs.plugins.pubplug) |
6 | 6 | alias(libs.plugins.publish) |
7 | | - alias(libs.plugins.nexus) |
8 | 7 | alias(libs.plugins.versions) |
| 8 | + id("compile") |
9 | 9 | } |
10 | 10 |
|
11 | | -group = projectGroupId() |
12 | | -version = projectVersion() |
13 | | -extra["api"] = libs.versions.api.get() |
| 11 | +group = "io.openapiprocessor" |
| 12 | +version = libs.versions.project.get() |
14 | 13 |
|
15 | | -allprojects { |
16 | | - apply(plugin = "groovy") |
17 | | - |
18 | | - repositories { |
19 | | - mavenCentral() |
20 | | - |
21 | | - maven { |
22 | | - url = uri("https://oss.sonatype.org/content/repositories/snapshots") |
23 | | - content { |
24 | | - includeGroup("io.openapiprocessor") |
25 | | - } |
26 | | - mavenContent { |
27 | | - snapshotsOnly() |
28 | | - } |
29 | | - } |
30 | | - |
31 | | - java { |
32 | | - toolchain { |
33 | | - languageVersion.set(JavaLanguageVersion.of(11)) |
34 | | - } |
35 | | - } |
36 | | - } |
| 14 | +versions { |
| 15 | + packageName = "io.openapiprocessor.gradle" |
| 16 | + entries = mapOf( |
| 17 | + "version" to libs.versions.project.get(), |
| 18 | + "api" to libs.versions.api.get() |
| 19 | + ) |
| 20 | +} |
37 | 21 |
|
38 | | - dependencies { |
39 | | - compileOnly(rootProject.libs.openapi.processor.api) |
40 | | - implementation(localGroovy()) |
| 22 | +java { |
| 23 | + toolchain { |
| 24 | + languageVersion.set(JavaLanguageVersion.of(17)) |
41 | 25 | } |
42 | 26 | } |
43 | 27 |
|
|
46 | 30 | withSourcesJar() |
47 | 31 | } |
48 | 32 |
|
49 | | -@Suppress("UnstableApiUsage") |
50 | 33 | testing { |
51 | 34 | suites { |
52 | 35 | val test by getting(JvmTestSuite::class) { |
@@ -75,9 +58,14 @@ testing { |
75 | 58 | } |
76 | 59 | } |
77 | 60 |
|
78 | | -//tasks.updateDaemonJvm { |
79 | | -// jvmVersion = JavaVersion.VERSION_17 |
80 | | -//} |
| 61 | +// compile groovy before kotlin |
| 62 | +tasks.compileGroovy { |
| 63 | + classpath = sourceSets.main.get().compileClasspath |
| 64 | +} |
| 65 | + |
| 66 | +tasks.compileKotlin { |
| 67 | + libraries.from(sourceSets.main.get().groovy.classesDirectory) |
| 68 | +} |
81 | 69 |
|
82 | 70 | tasks.named<Test>("testInt") { |
83 | 71 | shouldRunAfter(tasks.named("test")) |
@@ -107,18 +95,14 @@ gradlePlugin { |
107 | 95 | create("processorPlugin") { |
108 | 96 | id = "io.openapiprocessor.openapi-processor" |
109 | 97 | displayName = "Gradle openapi-processor plugin" |
110 | | - description = "plugin to run openapi-processor-*, e.g. openapi-processor-spring (requires gradle 7.0+, with gradle 5.5+ use 2021.3)" |
| 98 | + description = "plugin to run openapi-processor-*, e.g. openapi-processor-spring (requires gradle 7.2+)" |
111 | 99 | tags.set(listOf("openapi", "openapi-processor")) |
112 | 100 | implementationClass = "io.openapiprocessor.gradle.OpenApiProcessorPlugin" |
113 | 101 | } |
114 | 102 | } |
115 | 103 | } |
116 | 104 |
|
117 | | -nexusPublishing { |
118 | | - repositories { |
119 | | - sonatype { |
120 | | - username = getPublishUser() |
121 | | - password = getPublishKey() |
122 | | - } |
123 | | - } |
| 105 | +publishingCentral { |
| 106 | + deploymentName = "gradle" |
| 107 | + waitFor = "VALIDATED" |
124 | 108 | } |
0 commit comments