mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
Initial attempt at deploying to gradle plugin portal (#2440)
This commit is contained in:
committed by
William Cheng
parent
d93fd31bb1
commit
93baa5d835
@@ -133,6 +133,8 @@ after_success:
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
|
||||
echo "Finished ./gradlew uploadArchives";
|
||||
./gradlew publishPlugins
|
||||
echo "Finished ./gradlew publishPlugins (plugin portal)"
|
||||
popd;
|
||||
elif ([[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]) ; then
|
||||
mvn clean deploy --settings CI/settings.xml;
|
||||
@@ -141,6 +143,8 @@ after_success:
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
|
||||
echo "Finished ./gradlew uploadArchives";
|
||||
./gradlew publishPlugins
|
||||
echo "Finished ./gradlew publishPlugins (plugin portal)"
|
||||
popd;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
@@ -11,10 +11,14 @@ buildscript {
|
||||
maven {
|
||||
url "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "gradle.plugin.org.gradle.kotlin:gradle-kotlin-dsl-plugins:1.0-rc-3"
|
||||
classpath "com.gradle.publish:plugin-publish-plugin:0.10.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +33,7 @@ specifications as part of your build. Other tasks are available as command line
|
||||
"""
|
||||
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
||||
|
||||
apply plugin: 'com.gradle.plugin-publish'
|
||||
apply plugin: 'java-gradle-plugin'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'signing'
|
||||
@@ -39,6 +44,7 @@ sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven {
|
||||
@@ -90,6 +96,23 @@ gradlePlugin {
|
||||
}
|
||||
}
|
||||
|
||||
pluginBundle {
|
||||
// These settings are set for the whole plugin bundle
|
||||
website = 'https://openapi-generator.tech/'
|
||||
vcsUrl = 'https://github.com/OpenAPITools/openapi-generator'
|
||||
description = 'OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)'
|
||||
|
||||
plugins {
|
||||
// first plugin
|
||||
openApiGenerator {
|
||||
id = 'org.openapi.generator'
|
||||
displayName = 'OpenAPI Generator Gradle Plugin'
|
||||
tags = ['openapi-3.0', 'openapi-2.0', 'openapi', 'swagger', 'codegen', 'sdk']
|
||||
version = "$openApiGeneratorVersion"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// signing will require three keys to be defined: signing.keyId, signing.password, and signing.secretKeyRingFile.
|
||||
// These can be passed to the gradle command:
|
||||
// ./gradlew -Psigning.keyId=yourid
|
||||
|
||||
Reference in New Issue
Block a user