-1
私のビルドで生成されたバンドルの名前を変更して、その名前にバージョンを指定したいのですが、すべて無視されてしまい、バンドルがプロジェクトフォルダ名毎回。gradleワークスペースプラグインで生成されたバンドルの名前を変更するには
build.gradleファイル
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/org.osgi/org.osgi.core
compile group: 'org.osgi', name: 'org.osgi.core', version: '6.0.0'
}
task copyJar(type: Copy) {
from('generated')
include('*.jar')
into("$rootDir/build/lib/bundles")
}
build.finalizedBy(copyJar)
gradle.properties
bundle_name=helloworld
bundle_version=5.1.2
私が理解から、ジャータスクは何もあればjarファイルに名前を付けるために、他のプロパティと一緒にベース名とバージョンのプロパティを使用していますが指定されているので、build.gradleファイルで試してみましたが、うまくいきませんでした。プロジェクトフォルダの名前でjarファイルを取得しています。
jar.baseName = "$bundle_name"
jar.version = "$bundle_version"
もBNDワークスペースプラグインを使用してイム、と私はその方法をオーバーライドしたjarタスクが
が、イムわからない作品
//Applying the Gradle BND Plugin for Workspace Builds
//https://github.com/bndtools/bnd/blob/master/biz.aQute.bnd.gradle/README.md
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "biz.aQute.bnd:biz.aQute.bnd.gradle:${bnd_version}"
}
}
apply plugin: 'biz.aQute.bnd.workspace'
apply plugin: 'java'
// Repositorios, aguante Maven Central.
/*
repositories {
mavenCentral()
}
*/
clean {
delete ("$rootDir/build/libs/bundles")
}
が
を読んでいただきありがとうございますbuild.gradleここで親プロジェクトだと思います
は魅力的な働きをしています。私は後続の質問をするかもしれません –
非常に先生ありがとう?今すぐ動作し、希望の名前のjarファイルを取得しますが、gradleは2つのjarファイルを生成します.1つはbnd.bndファイルに設定した名前、もう1つはprevius汎用名でjarファイルを生成します。後のjarファイルの作成? –