snowe
05/14/2019, 5:06 PMapply
of the kotlin plugin. I can't parse whether the apply works because they increment the nebula-kotlin version whenever a new kotlin version is released, or if it works because of the configurations
block that changes the resolution strategy. https://github.com/nebula-plugins/nebula-kotlin-plugin/blob/master/src/main/kotlin/netflix/nebula/NebulaKotlinPlugin.ktgildor
05/14/2019, 11:34 PMsnowe
05/15/2019, 12:54 AMid("company.spring") version "any version of spring here"
and then be able to not only apply that version of the actual spring plugin (from within my plugin) but also apply custom configurations to that plugin. I'm wondering if the only way to actually handle this is to release a new version of the custom plugin for every version of the spring plugin, or if there is a better way.gildor
05/15/2019, 1:55 AMgildor
05/15/2019, 1:57 AMplugins {
id("company.spring") version "your_plugin_version"
}
companySpring {
springVersion = "spring_version"
}
snowe
05/15/2019, 1:57 AMsnowe
05/15/2019, 1:57 AMgildor
05/15/2019, 2:01 AMI’d be able to modify that dependency at runtimeModify plugin dependency on runtime? what do you mean?
snowe
05/15/2019, 2:09 AMdependencies {
implementation("com.netflix.nebula:nebula-kotlin-plugin:2.0.2")
implementation("com.netflix.nebula:nebula-publishing-plugin:10.0.0")
implementation("nu.studer:gradle-credentials-plugin:1.0.7")
implementation("org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-noarg:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion")
implementation("net.researchgate:gradle-release:3.0.0-RC3")
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7")
implementation("org.ajoberstar.grgit:grgit-core:3.1.1")
implementation("gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:1.1.2")
// id("org.springframework.boot") version ("2.1.2.RELEASE")
implementation("org.springframework.boot:spring-boot-gradle-plugin:2.1.4.RELEASE")
}
snowe
05/15/2019, 2:10 AMclass PromontechDockerPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run {
apply<PromontechBasePlugin>()
apply<com.google.cloud.tools.jib.gradle.JibPlugin>()
snowe
05/15/2019, 2:11 AMclass PromontechDockerPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run {
apply<PromontechBasePlugin>()
project.dependencies.add("...:spring:different version here")
apply<DifferentVersionOfSpringPluginHere>()