gradle - How to download a non-dependency artefact as part of buildScript block for Semantic Versioning -



gradle - How to download a non-dependency artefact as part of buildScript block for Semantic Versioning -

first off, have no code show since i'm stumped one. bad form question apologize - worked entire yesterday on related build script couldn't useful show this.

i working on build script part of jar task (or rather dolast {} closure) verify current jar against previous published jar own artifactory using semver api. else have works except downloading previous version of project; can't seem able devise working script.

my approach far based on reasoning gradle uses ivy dependency management scheme should able phone call of ivy's ant tasks right parameters - same current project have access group, name , current version - , path downloaded artefact file , utilize input aforementioned semver api. beingness bit of gradle newbie , not have used ivy few years struggle revealed me @ point have no thought how in clean way. 1 of major hurdles has far been gradle's documentation extensive making hard find things when don't remember right terms bits want have.

as i'm not providing code/build script samples of have far, don't mind if answers nudges right direction.

gradle has not used ivy internally time, uncertainty much if approach of using ivy ant tasks work.

i in separate task, rather add together actions jar task. there more elegant way, seek like:

configurations { lastpublishedversion } configurations.lastpublishedversion.transitive=false dependencies { lastpublishedversion group: group, name: name, version: "+" } task checksemver { dependson jar dependson configurations.lastpublishedversion dolast { println configurations.lastpublishedversion.getsinglefile() } }

ps if working create interesting gradle plugin if wanted release :)

gradle ivy semantic-versioning

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -