From 18412be171467c1ec8bb2da9f9df202df963219b Mon Sep 17 00:00:00 2001 From: iamceph Date: Fri, 18 Mar 2022 09:58:52 +0100 Subject: [PATCH] fix: provide dependency versions for Spring --- gradle-plugin/build.gradle | 3 --- gradle.properties | 4 +++- publishing.gradle | 15 +++++++-------- server-starter/build.gradle | 6 +++--- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/gradle-plugin/build.gradle b/gradle-plugin/build.gradle index 626f9d5..2aa5550 100644 --- a/gradle-plugin/build.gradle +++ b/gradle-plugin/build.gradle @@ -11,11 +11,8 @@ apply from: '../publishing.gradle' def publishKey = System.getenv('GRADLE_PUBLISH_KEY') def publishSecret = System.getenv('GRADLE_PUBLISH_SECRET') if (publishSecret != null && publishKey != null) { - System.out.println("Setting publish key/secret.") System.setProperty("gradle.publish.key", publishKey) System.setProperty("gradle.publish.secret", publishSecret) -} else { - System.out.println("Key/Secret not available for publishing!") } diff --git a/gradle.properties b/gradle.properties index 6b1f232..fc79dd6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,4 +7,6 @@ RSOCKET_IPC_VERSION=0.3.0 RSOCKET_RPC_VERSION=0.3.0 PROTOBUF_VERSION=3.19.2 -PROTOBUF_PLUGIN_VERSION=0.8.18 \ No newline at end of file +PROTOBUF_PLUGIN_VERSION=0.8.18 + +SPRING_VERSION=2.6.4 \ No newline at end of file diff --git a/publishing.gradle b/publishing.gradle index 8bd7709..cc3ff0d 100644 --- a/publishing.gradle +++ b/publishing.gradle @@ -31,14 +31,13 @@ publishing { dependencyNode.appendNode('scope', 'provided') } } - if (!project.tasks.findByName("shadowJar")) { - project.configurations.api.dependencies.each { - def dependencyNode = dependenciesNode.appendNode('dependency') - dependencyNode.appendNode('groupId', it.group) - dependencyNode.appendNode('artifactId', it.name) - dependencyNode.appendNode('version', it.version) - dependencyNode.appendNode('scope', 'compile') - } + + project.configurations.api.dependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + dependencyNode.appendNode('scope', 'compile') } } diff --git a/server-starter/build.gradle b/server-starter/build.gradle index ac9edb7..6e64c6b 100644 --- a/server-starter/build.gradle +++ b/server-starter/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'org.springframework.boot' version '2.6.4' + id 'org.springframework.boot' version "${SPRING_VERSION}" } apply plugin: 'java' @@ -12,11 +12,11 @@ apply from: '../publishing.gradle' dependencies { compileOnly group: 'org.jetbrains', name: 'annotations', version: JETBRAINS_ANNOTATIONS_VERSION - compileOnly group: 'org.springframework.boot', name: 'spring-boot-starter-actuator' + compileOnly group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: SPRING_VERSION implementation group: 'com.iamceph.resulter', name: 'resulter-core', version: RESULTER_VERSION - api group: 'org.springframework.boot', name: 'spring-boot-starter' + api group: 'org.springframework.boot', name: 'spring-boot-starter', version: SPRING_VERSION api group: 'io.rsocket', name: 'rsocket-core', version: RSOCKET_VERSION api group: 'io.rsocket', name: 'rsocket-transport-netty', version: RSOCKET_VERSION