Created
September 16, 2016 10:31
-
-
Save marc0der/1634a1d7ba60d1229eb3d701357732f5 to your computer and use it in GitHub Desktop.
Using a custom version resolution strategy with the Gradle Plugin Publish Plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
maven { url "https://plugins.gradle.org/m2/" } | |
} | |
dependencies { | |
classpath "com.gradle.publish:plugin-publish-plugin:0.9.6" | |
classpath "com.netflix.nebula:nebula-kotlin-plugin:1.0.3" | |
} | |
} | |
apply plugin: "com.gradle.plugin-publish" | |
apply plugin: "nebula.kotlin" | |
//add new configuration | |
configurations { | |
pluginCompile | |
} | |
dependencies { | |
compile gradleApi() | |
//dependency with no version, to be inferred by nebula | |
pluginCompile 'org.jetbrains.kotlin:kotlin-reflect' | |
//adds subsequently resolved depenedencies to compile configuration | |
configurations.pluginCompile.resolvedConfiguration.firstLevelModuleDependencies.each { | |
compile "${it.moduleGroup}:${it.moduleName}:${it.moduleVersion}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment