kotlin-dsl

gradle kotlin DSL extendsfrom

橙三吉。 提交于 2020-08-10 20:13:27
问题 How can I reformulate: testCompile.extendsFrom compileOnly of the Gradle Groovy DSL to its Kotlin-based equivalent? configurations { testCompile{ extendsFrom(compileOnly) } } My approach above fails. 回答1: configurations { testCompile { extendsFrom(configurations.compileOnly.get()) } } https://github.com/spring-projects/spring-boot/issues/16251 来源: https://stackoverflow.com/questions/62452133/gradle-kotlin-dsl-extendsfrom

How to migrate from Kotlin 1.2 to 1.3 with the kotlin-dsl Gradle plugin?

房东的猫 提交于 2020-03-23 15:37:20
问题 I am currently using the kotlin-dsl Gradle plugin 0.18.2, Kotlin 1.2.51 and Gradle 4.10.2 in my Android project (take a look at the temporary project-setup branch). I like to migrate to Kotlin 1.3 . However, I have difficulties in finding out which combination of version works. I raised the dependencies to their latest version: // in build.gradle.kts: id("org.gradle.kotlin.kotlin-dsl") version "1.0.4" ... // in build.gradle: org.jetbrains.kotlin:kotlin-stdlib:1.3.10 As soon as I run a Gradle

How to migrate from Kotlin 1.2 to 1.3 with the kotlin-dsl Gradle plugin?

徘徊边缘 提交于 2020-03-23 15:37:20
问题 I am currently using the kotlin-dsl Gradle plugin 0.18.2, Kotlin 1.2.51 and Gradle 4.10.2 in my Android project (take a look at the temporary project-setup branch). I like to migrate to Kotlin 1.3 . However, I have difficulties in finding out which combination of version works. I raised the dependencies to their latest version: // in build.gradle.kts: id("org.gradle.kotlin.kotlin-dsl") version "1.0.4" ... // in build.gradle: org.jetbrains.kotlin:kotlin-stdlib:1.3.10 As soon as I run a Gradle

How to conditionally accept Gradle build scan plugin terms of service in Kotlin DSL?

牧云@^-^@ 提交于 2019-12-24 00:38:39
问题 This basically extends this question to Kotlin DSL instead of Groovy DSL: How does the Groovy DSL solution of if (hasProperty('buildScan')) { buildScan { termsOfServiceUrl = 'https://gradle.com/terms-of-service' termsOfServiceAgree = 'yes' } } translate to Kotlin DSL? The problem I'm running is that the "buildScan" extension or the com.gradle.scan.plugin.BuildScanExtension class cannot statically be used as they are either present or not present depending on whether the --scan command line