Skip to content

Commit 8adadc3

Browse files
committed
update gradle plugin with new depedencies
1 parent cc3d696 commit 8adadc3

File tree

1 file changed

+3
-87
lines changed

1 file changed

+3
-87
lines changed
Lines changed: 3 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
import io.github.gradlenexus.publishplugin.CloseNexusStagingRepository
2-
import io.github.gradlenexus.publishplugin.ReleaseNexusStagingRepository
31
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
42

53
plugins {
6-
id("com.gradle.plugin-publish") version "1.1.0"
7-
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
8-
id("java-gradle-plugin")
9-
id("maven-publish")
10-
id("org.gradle.kotlin.kotlin-dsl") version "2.4.1"
4+
id("com.gradle.plugin-publish") version "1.3.1"
5+
id("org.gradle.kotlin.kotlin-dsl") version "4.2.1"
116
id("org.jetbrains.kotlin.jvm") version "1.9.0"
127
id("signing")
138
}
@@ -33,10 +28,6 @@ java {
3328
repositories {
3429
mavenLocal()
3530
mavenCentral()
36-
maven {
37-
name = "Sonatype Snapshots"
38-
url "https://oss.sonatype.org/content/repositories/snapshots/"
39-
}
4031
}
4132

4233
dependencies {
@@ -73,14 +64,6 @@ tasks.withType(Javadoc).configureEach {
7364
}
7465
}
7566

76-
tasks.withType(CloseNexusStagingRepository).configureEach {
77-
onlyIf { nexusPublishing.useStaging.get() }
78-
}
79-
80-
tasks.withType(ReleaseNexusStagingRepository).configureEach {
81-
onlyIf { nexusPublishing.useStaging.get() }
82-
}
83-
8467
gradlePlugin {
8568
website = "https://openapi-generator.tech/"
8669
vcsUrl = "https://github.com/OpenAPITools/openapi-generator"
@@ -90,76 +73,9 @@ gradlePlugin {
9073
description = "OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)."
9174
displayName = "OpenAPI Generator Gradle Plugin"
9275
implementationClass = "org.openapitools.generator.gradle.plugin.OpenApiGeneratorPlugin"
93-
tags.addAll("openapi-3.0", "openapi-2.0", "openapi", "swagger", "codegen", "sdk")
94-
}
95-
}
96-
}
97-
98-
nexusPublishing {
99-
repositories {
100-
sonatype {
101-
username = project.properties["ossrhUsername"]
102-
password = project.properties["ossrhPassword"]
103-
104-
// To retrieve: ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="$SIGNING_SECRET" getStagingProfile
105-
stagingProfileId = "456297f829bbbe"
76+
tags.addAll("openapi-3.1", "openapi-3.0", "openapi-2.0", "openapi", "swagger", "codegen", "sdk")
10677
}
10778
}
10879
}
10980

110-
// Signing requires three keys to be defined: signing.keyId, signing.password, and signing.secretKeyRingFile.
111-
// These can be passed to the Gradle command:
112-
// ./gradlew -Psigning.keyId=yourid
113-
// or stored as key=value pairs in ~/.gradle/gradle.properties
114-
// You can also apply them in CI via environment variables. See Gradle's docs for details.
115-
signing {
116-
required { isReleaseVersion && gradle.taskGraph.hasTask("publishPluginMavenPublicationToSonatypeRepository") }
117-
sign(publishing.publications)
118-
}
119-
120-
// afterEvaluate is necessary because java-gradle-plugin
121-
// creates its publications in an afterEvaluate callback
122-
afterEvaluate {
123-
tasks.named("publishToSonatype").configure {
124-
dependsOn("check")
125-
}
12681

127-
publishing {
128-
publications {
129-
pluginMaven {
130-
pom {
131-
name = "OpenAPI-Generator Contributors"
132-
description = project.description
133-
url = "https://openapi-generator.tech"
134-
organization {
135-
name = "org.openapitools"
136-
url = "https://github.com/OpenAPITools"
137-
}
138-
licenses {
139-
license {
140-
name = "The Apache Software License, Version 2.0"
141-
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
142-
distribution = "repo"
143-
}
144-
}
145-
developers {
146-
developer {
147-
id = "openapitools"
148-
name = "OpenAPI-Generator Contributors"
149-
150-
}
151-
}
152-
scm {
153-
url = "https://github.com/OpenAPITools/openapi-generator"
154-
connection = "scm:git:git://github.com/OpenAPITools/openapi-generator.git"
155-
developerConnection = "scm:git:ssh://[email protected]:OpenAPITools/openapi-generator.git"
156-
}
157-
issueManagement {
158-
system = "GitHub"
159-
url = "https://github.com/OpenAPITools/openapi-generator/issues"
160-
}
161-
}
162-
}
163-
}
164-
}
165-
}

0 commit comments

Comments
 (0)