Bernhard
09/04/2018, 7:21 AMbdawg.io
09/06/2018, 1:27 AMmp
09/06/2018, 8:42 AMbuildSrc/build.gradle.kts
- does it affects onto main build.gradle.kts
? because when I add buildSrc/build.gradle.kts
and try to define some dependencies for my plugin - main file becomes "red"vpriscan
09/06/2018, 3:27 PMvpriscan
09/06/2018, 3:28 PMpavel.v
09/06/2018, 6:56 PMjmfayard
09/07/2018, 1:00 PMtask helloworld << {
println("hello world")
}
colljos
09/11/2018, 9:03 AMinternal
keyword inside the same module for say integrationTests
(eg. as per the above definition it can be used across main
and unit
in the same module)?rkeazor
09/11/2018, 11:59 AMuser
09/12/2018, 12:09 PMirus
09/14/2018, 1:14 PMTobi
09/14/2018, 2:55 PMbuild.gradle.kts
with Kotlin 1.2.61 and Gradle wrapper 4.10.1:
buildscript {
repositories {
maven("<https://dl.bintray.com/kotlin/kotlin-dev>")
}
}
repositories {
maven("<https://dl.bintray.com/kotlin/kotlin-dev>")
}
plugins {
id("org.gradle.kotlin.kotlin-dsl") version "0.18.3"
}
When I try to increase the version of kotlin-dsl
to f.e. 0.18.4
or the latest 0.19.5
I get the following error:
Plugin [id: 'org.gradle.kotlin.kotlin-dsl', version: '0.18.4'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:0.18.4')
Searched in the following repositories:
Gradle Central Plugin Repository
What maven repository is missing here?
Or, which combination of Kotlin and kotlin-dsl should work?ianbrandt
09/15/2018, 9:23 PMconfigurations {
testImplementation {
}
}
...I get:
Script compilation error:
Line 21: testImplementation {
^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public inline fun <T : ModuleDependency> DependencyHandler.testImplementation(dependency: TypeVariable(T), dependencyConfiguration: TypeVariable(T).() -> Unit): TypeVariable(T) defined in org.gradle.kotlin.dsl
public fun DependencyHandler.testImplementation(dependencyNotation: Any): Dependency? defined in org.gradle.kotlin.dsl
public fun DependencyHandler.testImplementation(group: String, name: String, version: String? = ..., configuration: String? = ..., classifier: String? = ..., ext: String? = ...): ExternalModuleDependency defined in org.gradle.kotlin.dsl
public inline fun DependencyHandler.testImplementation(group: String, name: String, version: String? = ..., configuration: String? = ..., classifier: String? = ..., ext: String? = ..., dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency defined in org.gradle.kotlin.dsl
public inline fun DependencyHandler.testImplementation(dependencyNotation: String, dependencyConfiguration: ExternalModuleDependency.() -> Unit): ExternalModuleDependency defined in org.gradle.kotlin.dsl
1 error
Vladyslav Sitalo
09/16/2018, 2:28 PMmaven(url = "<https://jitpack.io>")
• The plugin is published on the gradle plugin portal.
When I’m trying to use the plugin though I’m facing several problems:
• If I just use the plugin via id("org.stvad.kask") version "0.1.1"
entry in plugins
section, the project fails initial configuration, with the following error (basically gradle is looking for dependency in the wrong place and not finding it):
Could not find com.github.Stvad:kask:-SNAPSHOT.
Searched in the following locations:
- file:/Users/sitalov/.gradle/caches/4.10/embedded-kotlin-repo-1.2.60-2/repo/com/github/Stvad/kask/-SNAPSHOT/maven-metadata.xml
- file:/Users/sitalov/.gradle/caches/4.10/embedded-kotlin-repo-1.2.60-2/repo/com/github/Stvad/kask/-SNAPSHOT/kask--SNAPSHOT.jar
- <https://plugins.gradle.org/m2/com/github/Stvad/kask/-SNAPSHOT/maven-metadata.xml>
- <https://plugins.gradle.org/m2/com/github/Stvad/kask/-SNAPSHOT/kask--SNAPSHOT.pom>
- <https://plugins.gradle.org/m2/com/github/Stvad/kask/-SNAPSHOT/kask--SNAPSHOT.jar>
Required by:
project : > org.stvad.kask:org.stvad.kask.gradle.plugin:0.1.1 > org.stvad:kask-gradle-plugin:0.1.1
I can work around that problem by adding the following configuration in the project settings:
kotlin
pluginManagement {
repositories {
gradlePluginPortal()
maven(url = "<https://jitpack.io>")
}
}
Which, works, I guess =/, but I’m surprised I have to do this.
But after that I have more troubles - my understanding was that plugin dependencies should be transitively available to the project using that plugin. But it does not seem to work for me - in order to make the aforementioned library usable from the project that is applying the plugin, I had to explicitly declare repository and dependency configurations.
Which means that to use the plugin properly user would have to: 1) apply it; 2) change plugin repo configuration; 3) add new repo to the project; 4) add explicit library dependency to the project. Which seems rather cumbersome.
What I want to achieve is situation when a user of a plugin just needs to apply it and does not have to worry about dependency any dependency declarations. I’d appreciate your advice on how I can achieve that!eriwen
09/17/2018, 10:12 PMgildor
09/18/2018, 1:18 AM<http://plugins.gradle.org|plugins.gradle.org>
?
Is there any issue about supporting of Kotlin DSL snippets?cfleming
09/19/2018, 9:30 AMCaused by: java.lang.ClassNotFoundException: org.gradle.api.attributes.HasAttributes
myanmarking
09/19/2018, 12:27 PMUzi Landsmann
09/19/2018, 3:45 PMbuild.gradle.kts
, that I want to target JVM 10?rpalcolea
09/20/2018, 8:04 PMRequired by:
project :example-v8
> Unable to find a matching variant of project :karibu-dsl-v8:
- Variant 'apiElements':
- Found org.gradle.usage 'java-api' but wasn't required.
- Required org.jetbrains.kotlin.platform.type 'common' and found incompatible value 'jvm'.
- Variant 'runtimeElements':
- Found org.gradle.usage 'java-runtime-jars' but wasn't required.
- Required org.jetbrains.kotlin.platform.type 'common' and found incompatible value 'jvm'.
when using kotlin 1.2.70 and gradlecitizenmatt
09/25/2018, 7:47 AMbuild.gradle.kts
files? I'm a complete newbie to the Kotlin DSL and struggling with getting plugins to work in a foo.gradle.kts
file, and it would be nice to see how others have done it.Czar
09/25/2018, 11:40 AMNikky
09/25/2018, 11:40 AM+
and that range syntax [5,)
is supported by gradleoctylFractal
09/26/2018, 5:22 AMext
variables by adding extension methods that cast the valuesspierce7
09/26/2018, 1:19 PMbuildSrc
folder, but I still have red errors in the IDE. I have to sync the project, and then open the buildSrc file again for the IDE error to disappear. Is that a known issue?spierce7
09/26/2018, 2:54 PMbuildSrc
, but also, the buildscript
block so that I can add the kotlin plugin to the classpath. Is there a way around this?max
09/26/2018, 6:47 PM.idea
and all `.iml` files and reimport the project, nothing helps. build.gradle.kts files are still all in red. Building is still working properly btw. I saw the answer: https://kotlinlang.slack.com/archives/C19FD9681/p1519224896000437?thread_ts=1519133138.000031&cid=C19FD9681
also saw that this bug in AS is marked as fixed: https://youtrack.jetbrains.com/issue/KT-20521
It just soooo frustrating to work with dsl, just asking for some workaround here, maybe i’m missing some simple tweak?kingsley
09/27/2018, 9:39 AMribesg
09/27/2018, 9:55 AMresolutionStrategy
block in settings.gradle.kts
?ribesg
09/27/2018, 9:56 AMribesg
09/27/2018, 9:56 AMgildor
09/27/2018, 9:58 AM