Skip to content

Commit

Permalink
gradle: Fix some overlooked references to deprecated Jar task properties
Browse files Browse the repository at this point in the history
Signed-off-by: BJ Hargrave <[email protected]>
  • Loading branch information
bjhargrave committed Jan 14, 2020
1 parent b62b818 commit f612770
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions biz.aQute.bnd.gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ configurations {
baseline
}
dependencies {
baseline('group': group, 'name': jar.baseName) {
baseline('group': group, 'name': jar.archiveBaseName) {
version {
strictly "(0,${jar.version}["
strictly "(0,${jar.archiveVersion.get()}["
}
transitive = false
}
Expand Down
4 changes: 2 additions & 2 deletions biz.aQute.bnd.gradle/src/aQute/bnd/gradle/Baseline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* baseline
* }
* dependencies {
* baseline('group': group, 'name': jar.baseName) {
* baseline('group': group, 'name': jar.archiveBaseName) {
* version {
* strictly "(0,${jar.version}["
* strictly "(0,${jar.archiveVersion.get()}["
* }
* transitive false
* }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package aQute.bnd.gradle

import static aQute.bnd.gradle.BndUtils.unwrap

import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
Expand Down Expand Up @@ -83,10 +85,12 @@ public class BndBuilderPlugin implements Plugin<Project> {
Task baselineTask = tasks.getByName('baseline')
Task bundleTask = baselineTask.getBundleTask()
if (bundleTask) {
logger.debug 'Searching for default baseline {}:{}:(0,{}[', group, bundleTask.baseName, bundleTask.version
Dependency baselineDep = dependencies.create('group': group, 'name': bundleTask.baseName) {
String archiveBaseName = unwrap(bundleTask.archiveBaseName)
String archiveVersion = unwrap(bundleTask.archiveVersion)
logger.debug 'Searching for default baseline {}:{}:(0,{}[', group, archiveBaseName, archiveVersion
Dependency baselineDep = dependencies.create('group': group, 'name': archiveBaseName) {
version {
strictly "(0,${bundleTask.version}["
strictly "(0,${archiveVersion}["
}
transitive = false
}
Expand Down
4 changes: 2 additions & 2 deletions biz.aQute.bnd.gradle/testresources/baselinetask2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ archivesBaseName = 'biz.aQute.bndlib'
version = '3.1.0'

jar {
baseName = 'biz.aQute.bnd'
version = '3.0.0'
archiveBaseName = 'biz.aQute.bnd'
archiveVersion = '3.0.0'
}

task echo {
Expand Down
2 changes: 1 addition & 1 deletion biz.aQute.bnd.gradle/testresources/builderplugin1/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
My-Header: my-value
text: TEXT
Override: Override the jar task manifest
Bundle-Name: ${project.group}:${task.baseName}
Bundle-Name: ${project.group}:${task.archiveBaseName}
Project-Name: ${project.name}
Project-Dir: ${project.dir}
Project-Output: ${project.output}
Expand Down
2 changes: 1 addition & 1 deletion biz.aQute.bnd.gradle/testresources/indexplugin1/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
My-Header: my-value
text: TEXT
Override: Override the jar task manifest
Bundle-Name: ${project.group}:${task.baseName}
Bundle-Name: ${project.group}:${task.archiveBaseName}
Project-Name: ${project.name}
Project-Dir: ${project.dir}
Project-Output: ${project.output}
Expand Down

0 comments on commit f612770

Please sign in to comment.