gradle-kotlin-dsl

How to configure the processResources task in a Gradle Kotlin build

安稳与你 提交于 2020-12-08 15:00:21
问题 I have the following in a groovy-based build script. How do I do the same in a kotlin-based script? processResources { filesMatching('application.properties'){ expand(project.properties) } } 回答1: I think task should look like: Edit : According this comment in gradle/kotlin-dsl repository. Task configuration should work this way: import org.gradle.language.jvm.tasks.ProcessResources apply { plugin("java") } (tasks.getByName("processResources") as ProcessResources).apply { filesMatching(

How do I use the native JUnit 5 support in Gradle with the Kotlin DSL?

拈花ヽ惹草 提交于 2020-12-02 04:49:53
问题 I want to use the built-in JUnit 5 with the Gradle Kotlin DSL, because during build I get this warning: WARNING: The junit-platform-gradle-plugin is deprecated and will be discontinued in JUnit Platform 1.3. Please use Gradle's native support for running tests on the JUnit Platform (requires Gradle 4.6 or higher): https://junit.org/junit5/docs/current/user-guide/#running-tests-build-gradle That links tells me to put test { useJUnitPlatform() } in my build.gradle , but what is the syntax for

How do I use the native JUnit 5 support in Gradle with the Kotlin DSL?

我怕爱的太早我们不能终老 提交于 2020-12-02 04:44:49
问题 I want to use the built-in JUnit 5 with the Gradle Kotlin DSL, because during build I get this warning: WARNING: The junit-platform-gradle-plugin is deprecated and will be discontinued in JUnit Platform 1.3. Please use Gradle's native support for running tests on the JUnit Platform (requires Gradle 4.6 or higher): https://junit.org/junit5/docs/current/user-guide/#running-tests-build-gradle That links tells me to put test { useJUnitPlatform() } in my build.gradle , but what is the syntax for

Could not get unknown property 'PrivateData' for object of type org.gradle.api.internal.initialization.DefaultScriptHandler

自闭症网瘾萝莉.ら 提交于 2020-11-29 21:05:44
问题 There is an open source project here. After trying multiple times to build it, there is an error that make build Failed : Task failed with an exception. Where: Build file '/src/apps/build.gradle' line: 19 What went wrong: A problem occurred evaluating root project 'apps'. Could not get unknown property 'PrivateData' for object of type org.gradle.api.internal.initialization.DefaultScriptHandler. Here is line 19 : buildscript { PrivateData.merge(project, "all-apps") ... } And the defined