Compare commits
11 Commits
githubActi
...
revert-425
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b7127df15 | ||
|
|
352977eef5 | ||
|
|
743624ee77 | ||
|
|
5f910fd564 | ||
|
|
c665d1f5cd | ||
|
|
da23c929c0 | ||
|
|
7141fc094b | ||
|
|
f6152f6c9b | ||
|
|
9f89c40280 | ||
|
|
f60999dd9f | ||
|
|
a45caa4d19 |
82
.github/workflows/gradle-build.yml
vendored
82
.github/workflows/gradle-build.yml
vendored
@@ -1,82 +0,0 @@
|
|||||||
# This workflow will build a Java project with Gradle
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
|
||||||
name: Build
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
jobs:
|
|
||||||
validation:
|
|
||||||
name: "Gradle wrapper validation"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2.3.5
|
|
||||||
- uses: gradle/wrapper-validation-action@v1.0.4
|
|
||||||
build:
|
|
||||||
name: "Build and publish"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2.3.5
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
|
||||||
- name: Set up JDK 11
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
|
||||||
java-version: '11'
|
|
||||||
distribution: 'temurin'
|
|
||||||
- name: Cache SonarCloud packages
|
|
||||||
uses: actions/cache@v2.1.6
|
|
||||||
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
|
|
||||||
env:
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
with:
|
|
||||||
path: ~/.sonar/cache
|
|
||||||
key: ${{ runner.os }}-sonar
|
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
|
||||||
- name: Build
|
|
||||||
id: gradle
|
|
||||||
uses: eskatos/gradle-command-action@v1
|
|
||||||
with:
|
|
||||||
arguments: check
|
|
||||||
wrapper-cache-enabled: true
|
|
||||||
dependencies-cache-enabled: true
|
|
||||||
configuration-cache-enabled: true
|
|
||||||
- name: "Comment build scan url"
|
|
||||||
uses: actions/github-script@v5
|
|
||||||
if: github.event_name == 'pull_request' && failure()
|
|
||||||
with:
|
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
script: |
|
|
||||||
github.issues.createComment({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
body: '❌ ${{ github.workflow }} failed: ${{ steps.gradle.outputs.build-scan-url }}'
|
|
||||||
})
|
|
||||||
- name: Publish Unit Test Results
|
|
||||||
uses: EnricoMi/publish-unit-test-result-action/composite@v1
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
files: '**/test-results/**/*.xml'
|
|
||||||
- name: Analyze with SonarCloud
|
|
||||||
continue-on-error: true
|
|
||||||
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
|
|
||||||
uses: eskatos/gradle-command-action@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
with:
|
|
||||||
arguments: sonarqube -Psonar.organization=swagger2markup
|
|
||||||
dependencies-cache-enabled: true
|
|
||||||
configuration-cache-enabled: true
|
|
||||||
- name: Publish to Sonatype
|
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
||||||
uses: eskatos/gradle-command-action@v1
|
|
||||||
env:
|
|
||||||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USER }}
|
|
||||||
ORG_GRADLE_PROJECT_sonatypePassword : ${{ secrets.SONATYPE_PASSWORD }}
|
|
||||||
with:
|
|
||||||
arguments: publishToSonatype
|
|
||||||
dependencies-cache-enabled: true
|
|
||||||
configuration-cache-enabled: true
|
|
||||||
45
build.gradle
45
build.gradle
@@ -1,10 +1,9 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "org.sonarqube" version "2.7"
|
id "org.sonarqube" version "2.7"
|
||||||
id "com.jfrog.bintray" version "1.8.4"
|
|
||||||
id "me.champeau.gradle.jmh" version "0.4.8"
|
id "me.champeau.gradle.jmh" version "0.4.8"
|
||||||
id 'org.asciidoctor.convert' version '1.6.0'
|
id 'org.asciidoctor.convert' version '1.6.0'
|
||||||
id "com.jfrog.artifactory" version "4.9.5"
|
|
||||||
id "org.ajoberstar.github-pages" version "1.7.2"
|
id "org.ajoberstar.github-pages" version "1.7.2"
|
||||||
|
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
|
||||||
}
|
}
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply from: "${rootDir}/libraries.gradle"
|
apply from: "${rootDir}/libraries.gradle"
|
||||||
@@ -16,7 +15,6 @@ ext {
|
|||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: 'jacoco'
|
apply plugin: 'jacoco'
|
||||||
apply plugin: 'me.champeau.gradle.jmh'
|
apply plugin: 'me.champeau.gradle.jmh'
|
||||||
apply plugin: 'com.jfrog.artifactory'
|
|
||||||
|
|
||||||
version = '2.0.0-SNAPSHOT'
|
version = '2.0.0-SNAPSHOT'
|
||||||
group 'io.github.swagger2markup'
|
group 'io.github.swagger2markup'
|
||||||
@@ -31,7 +29,7 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
artifactoryPublish.skip = true // apply to all projects except the root
|
//artifactoryPublish.skip = true // apply to all projects except the root
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
coreProjects = subprojects.findAll {
|
coreProjects = subprojects.findAll {
|
||||||
@@ -43,13 +41,12 @@ configure(project.coreProjects) {
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'com.jfrog.bintray'
|
|
||||||
apply from: "${rootDir}/publishing.gradle"
|
apply from: "${rootDir}/publishing.gradle"
|
||||||
apply plugin: 'jacoco'
|
apply plugin: 'jacoco'
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
sourceCompatibility = "1.8"
|
sourceCompatibility = "11"
|
||||||
targetCompatibility = "1.8"
|
targetCompatibility = "11"
|
||||||
options.deprecation = true
|
options.deprecation = true
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
options.compilerArgs += ["-Xlint:unchecked", "-parameters"]
|
options.compilerArgs += ["-Xlint:unchecked", "-parameters"]
|
||||||
@@ -67,8 +64,15 @@ configure(project.coreProjects) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nexusPublishing {
|
||||||
|
repositories {
|
||||||
|
sonatype()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sonarqube {
|
sonarqube {
|
||||||
properties {
|
properties {
|
||||||
|
property "sonar.host.url", "https://sonarcloud.io"
|
||||||
property "sonar.projectName", "swagger2markup"
|
property "sonar.projectName", "swagger2markup"
|
||||||
property "sonar.projectKey", "swagger2markup_swagger2markup"
|
property "sonar.projectKey", "swagger2markup_swagger2markup"
|
||||||
property "sonar.links.homepage", "https://github.com/Swagger2Markup/swagger2markup"
|
property "sonar.links.homepage", "https://github.com/Swagger2Markup/swagger2markup"
|
||||||
@@ -110,33 +114,6 @@ subprojects {
|
|||||||
|
|
||||||
tasks.check.dependsOn tasks.jacocoTestReport
|
tasks.check.dependsOn tasks.jacocoTestReport
|
||||||
|
|
||||||
|
|
||||||
test {
|
test {
|
||||||
dependsOn(subprojects.test) // required by cobertura to aggregate report
|
dependsOn(subprojects.test) // required by cobertura to aggregate report
|
||||||
}
|
}
|
||||||
|
|
||||||
artifactory {
|
|
||||||
contextUrl = 'https://oss.jfrog.org'
|
|
||||||
resolve {
|
|
||||||
repository {
|
|
||||||
repoKey = 'libs-release'
|
|
||||||
maven = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
publish {
|
|
||||||
repository {
|
|
||||||
repoKey = 'oss-snapshot-local' //The Artifactory repository key to publish to
|
|
||||||
//when using oss.jfrog.org the credentials are from Bintray. For local build we expect them to be found in
|
|
||||||
//~/.gradle/gradle.properties, otherwise to be set in the build server
|
|
||||||
username = project.hasProperty('bintrayUsername') ? project.bintrayUsername : System.getenv('BINTRAY_USER')
|
|
||||||
password = project.hasProperty('bintrayApiKey') ? project.bintrayApiKey : System.getenv('BINTRAY_KEY')
|
|
||||||
}
|
|
||||||
defaults {
|
|
||||||
publications('mavenJava')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (System.properties['https.proxyHost']) {
|
|
||||||
clientConfig.proxy.host = System.properties['https.proxyHost']
|
|
||||||
clientConfig.proxy.port = System.properties['https.proxyPort'].toInteger()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -44,38 +44,6 @@ artifacts {
|
|||||||
archives javadocJar
|
archives javadocJar
|
||||||
}
|
}
|
||||||
|
|
||||||
bintray {
|
|
||||||
user = project.hasProperty('bintrayUsername') ? project.property('bintrayUsername') : ''
|
|
||||||
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : ''
|
|
||||||
dryRun = false //Whether to run this as dry-run, without deploying
|
|
||||||
publish = true //If version should be auto published after an upload
|
|
||||||
publications = ['mavenJava']
|
|
||||||
pkg {
|
|
||||||
repo = 'Maven'
|
|
||||||
name = "${projectArtifactId}"
|
|
||||||
userOrg = "${projectArtifactId}"
|
|
||||||
websiteUrl = "${projectUrl}"
|
|
||||||
issueTrackerUrl = issuesUrl
|
|
||||||
vcsUrl = scmUrl
|
|
||||||
desc = project.description
|
|
||||||
licenses = ['Apache-2.0']
|
|
||||||
version {
|
|
||||||
name = project.version
|
|
||||||
vcsTag = "v${project.version}"
|
|
||||||
gpg {
|
|
||||||
sign = true //Determines whether to GPG sign the files. The default is false
|
|
||||||
//Optional. The passphrase for GPG signing'
|
|
||||||
passphrase = project.hasProperty('gpgPassphrase') ? project.property('gpgPassphrase') : ''
|
|
||||||
}
|
|
||||||
mavenCentralSync {
|
|
||||||
sync = true //Optional (true by default). Determines whether to sync the version to Maven Central.
|
|
||||||
user = project.hasProperty('ossUser') ? project.property('ossUser') : '' //OSS user token
|
|
||||||
password = project.hasProperty('ossPassword') ? project.property('ossPassword') : '' //OSS user password
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
apply plugin: 'org.asciidoctor.convert'
|
apply plugin: 'org.asciidoctor.convert'
|
||||||
apply plugin: 'org.ajoberstar.github-pages'
|
apply plugin: 'org.ajoberstar.github-pages'
|
||||||
|
|
||||||
artifactoryPublish.skip=true
|
//artifactoryPublish.skip=true
|
||||||
sonarqube.skipProject=true
|
sonarqube.skipProject=true
|
||||||
|
|
||||||
asciidoctor.dependsOn test
|
asciidoctor.dependsOn test
|
||||||
|
|||||||
Reference in New Issue
Block a user