Skip to content

Commit

Permalink
fix: update default version impl
Browse files Browse the repository at this point in the history
  • Loading branch information
iamceph committed Mar 18, 2022
1 parent 18412be commit 4b84b88
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,11 @@ tasks.withType(PublishToMavenRepository) {
if (name.contains("Sonatype")) {
enabled(false)
}
}

jar {
manifest {
attributes('Implementation-Title': 'Springed RSocket plugin',
'Implementation-Version': "${project.version}")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package com.iamceph.springed.rsocket
class SpringedRSocketExtension {
String rsocketVersion = "1.1.1"
String rsocketRpcVersion = "0.3.0"
String springedRsocketVersion = "1.0.1"
String springedRsocketVersion
String protobufVersion = "3.19.2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class SpringedRSocketPlugin implements Plugin<Project> {
@Override
void apply(Project project) {
def extension = project.extensions.create("springedRSocket", SpringedRSocketExtension)
extension.springedRsocketVersion = determineVersion() ?: "1.0.1"

project.afterEvaluate {
project.getPluginManager().withPlugin("java", plugin -> {
Expand All @@ -17,4 +18,9 @@ class SpringedRSocketPlugin implements Plugin<Project> {
})
}
}

private static String determineVersion() {
def pack = SpringedRSocketPlugin.class.getPackage()
return pack != null ? pack.getImplementationVersion() : null
}
}

0 comments on commit 4b84b88

Please sign in to comment.