diff --git a/.travis.yml b/.travis.yml index fff3b20d..67c2d383 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,19 +10,14 @@ cache: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ before_install: -- chmod +x ./publish.sh -- "openssl aes-256-cbc -K $encrypted_12c8071d2874_key -iv $encrypted_12c8071d2874_iv -in codesigning.asc.enc -out codesigning.asc -d && gpg --import ./codesigning.asc || echo" -- cd ./grpc-spring-boot-starter-gradle-plugin -- "openssl aes-256-cbc -K $encrypted_12c8071d2874_key -iv $encrypted_12c8071d2874_iv -in ./../codesigning.asc.enc -out codesigning.asc -d && gpg --import ./codesigning.asc || echo" -- cd ./.. + - chmod +x ./publish.sh + - "openssl aes-256-cbc -K $encrypted_12c8071d2874_key -iv $encrypted_12c8071d2874_iv -in codesigning.asc.enc -out codesigning.asc -d && gpg --import ./codesigning.asc || echo" install: true # disables default "./gradlew assemble" install script after_success: - ./publish.sh - bash <(curl -s https://codecov.io/bash) script: - #- ./gradlew build codeCoverageReport - - ./gradlew -S -p grpc-spring-boot-starter-gradle-plugin build - + - ./gradlew build codeCoverageReport diff --git a/gradle.properties b/gradle.properties index bf666498..5d3fecee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ grpcVersion=1.38.0 springBootVersion=2.5.0 springCloudVersion=2020.0.3 -version=4.5.4 +version=4.5.5-SNAPSHOT group=io.github.lognet description=Spring Boot starter for Google RPC. gitHubUrl=https\://github.com/LogNet/grpc-spring-boot-starter diff --git a/grpc-spring-boot-starter-gradle-plugin/build.gradle b/grpc-spring-boot-starter-gradle-plugin/build.gradle index 7e5a199b..17380413 100644 --- a/grpc-spring-boot-starter-gradle-plugin/build.gradle +++ b/grpc-spring-boot-starter-gradle-plugin/build.gradle @@ -26,16 +26,6 @@ project['signing.secretKeyRingFile'] = '/home/travis/.gnupg/secring.gpg' project['gradle.publish.key'] = System.getenv('gradlePublishKey') project['gradle.publish.secret'] = System.getenv('gradlePublishSecret') - -println "Parent" : -fileTree("../").visit { FileVisitDetails details -> - println details.file.path -} -println "Dir" : -fileTree("./").visit { FileVisitDetails details -> - println details.file.path -} - repositories { mavenCentral() maven { @@ -96,7 +86,35 @@ nexusPublishing { } } +def withPom = {pomObj-> + configure(pomObj,{ + name = 'grpc-spring-boot-starter-gradle-plugin' + description = 'Configures project with grpc-spring-boot-starter' + url = 'https://github.com/LogNet/grpc-spring-boot-starter' + scm { + url = 'https://github.com/LogNet/grpc-spring-boot-starter' + connection = 'scm:https://LogNet@github.com/LogNet/grpc-spring-boot-starter.git' + developerConnection = 'scm:git://github.com/LogNet/grpc-spring-boot-starter.git' + } + + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution = 'repo' + } + } + + developers { + developer { + id = 'jvmlet' + name = 'Furer Alexander' + email = 'furer.alexander@gmail.com' + } + } + }) +} publishing { publishing { repositories { @@ -110,66 +128,13 @@ publishing { publications { grpcBootPluginPluginMarkerMaven { // customize marker publications here - pom { - name = 'grpc-spring-boot-starter-gradle-plugin' - description = 'Configures project with grpc-spring-boot-starter marker' - url = 'https://github.com/LogNet/grpc-spring-boot-starter' - - scm { - url = 'https://github.com/LogNet/grpc-spring-boot-starter' - connection = 'scm:https://LogNet@github.com/LogNet/grpc-spring-boot-starter.git' - developerConnection = 'scm:git://github.com/LogNet/grpc-spring-boot-starter.git' - } - - licenses { - license { - name = 'The Apache Software License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution = 'repo' - } - } - - developers { - developer { - id = 'jvmlet' - name = 'Furer Alexander' - email = 'furer.alexander@gmail.com' - } - } - } + pom = withPom << {it.name +=" marker" } } pluginMaven { // customize main publications here artifact sourceJar artifact javadocJar - pom { - name = 'grpc-spring-boot-starter-gradle-plugin' - description = 'Configures project with grpc-spring-boot-starter' - url = 'https://github.com/LogNet/grpc-spring-boot-starter' - - scm { - url = 'https://github.com/LogNet/grpc-spring-boot-starter' - connection = 'scm:https://LogNet@github.com/LogNet/grpc-spring-boot-starter.git' - developerConnection = 'scm:git://github.com/LogNet/grpc-spring-boot-starter.git' - } - - licenses { - license { - name = 'The Apache Software License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution = 'repo' - } - } - - developers { - developer { - id = 'jvmlet' - name = 'Furer Alexander' - email = 'furer.alexander@gmail.com' - } - } - - } + pom = withPom } } } diff --git a/publish.sh b/publish.sh index 64c16d65..c6f8da37 100644 --- a/publish.sh +++ b/publish.sh @@ -1,9 +1,6 @@ #!/bin/bash if [[ ${TRAVIS_PULL_REQUEST} == 'false' ]] && [[ ${TRAVIS_BRANCH} == 'master' ]] && [[ ${TRAVIS_TAG} == '' ]]; then - #./gradlew -S publishToSonatype closeAndReleaseRepository - ll - ll ./grpc-spring-boot-starter-gradle-plugin - ./gradlew -S -p grpc-spring-boot-starter-gradle-plugin build publishToSonatype closeAndReleaseRepository -# ./gradlew -S -p grpc-spring-boot-starter-gradle-plugin build publishPlugins + ./gradlew -S publishToSonatype closeAndReleaseRepository + ./gradlew -S -p grpc-spring-boot-starter-gradle-plugin build publishToSonatype closeAndReleaseRepository publishPlugins fi \ No newline at end of file