アーティファクトを Ivy リポジトリに公開したいのですが、うまくいきません。私はこの記事を読み、読んだ後、このサンプルビルドを作成しました:
task ivyPublishTest << {
def buildDir = new File("build")
buildDir.mkdirs()
def fileToPublish = new File("build/file.abc")
fileToPublish.write("asdasdasd")
}
artifacts {
archives(ivyPublishTest.fileToPublish) {
name 'gradle-test-artifact'
builtBy ivyPublishTest
}
}
uploadArchives {
repositories {
ivy {
url "http://my.ivy.repo/ivyrep/shared"
}
}
}
もちろん、問題はそれが機能しないことです。このエラーが発生しますCould not find property 'fileToPublish' on task ':ivyPublishTest'