apomelov
11/09/2017, 8:57 AMval run: JavaExec by tasks
run.systemProperties["spring.profiles.active"] = "dev"
Second line is ok, but the first one looks like get any Task from map by name and cast it to JavaExec. Where is my strict typed model?)
Or I want to run coberturaReport prior to test:
val test by tasks
val coberturaReport by tasks
test.dependsOn(coberturaReport)
Ok, no casts but still getting tasks from map by name.Marcel Overdijk
11/11/2017, 11:55 AMplugins {
id "org.gradle.kotlin.kotlin-dsl" version "0.12.0"
}
mikehearn
11/11/2017, 6:27 PMCzar
11/12/2017, 8:49 PMthewoolleyman
11/14/2017, 5:21 AMgildor
11/14/2017, 6:46 AMlewis
11/15/2017, 9:18 AMBorzdeG
11/15/2017, 9:21 AMkotlinVersion
in the section plugins
?
val kotlinVersion: String by extra
plugins {
kotlin("jvm") version kotlinVersion
}
Unresolved reference: kotlinVersion
thewoolleyman
11/16/2017, 9:44 AMjlleitschuh
11/16/2017, 3:57 PMmkobit
11/16/2017, 9:00 PMLucas
11/17/2017, 2:19 AMproject.property("artUser")
.
For example:
gradle.properties
artUser=john
build.gradle.kts
val sayUser by tasks.creating {
doLast {
println(project.property("artUser")) // john
}
}
holgerbrandl
11/17/2017, 9:39 AMjava.lang.RuntimeException: Primary constructor not found for script template class ScriptTemplateWithArgs (not found)
at org.jetbrains.kotlin.codegen.ScriptCodegen.genConstructor(ScriptCodegen.java:161)
at org.jetbrains.kotlin.codegen.ScriptCodegen.generateBody(ScriptCodegen.java:103)
if there’s a kts file sitting somewhere in the source roots.christianbecker
11/19/2017, 4:24 PMchristianbecker
11/19/2017, 4:36 PMcarolos
11/20/2017, 1:32 PMvar kotlin_version by extra { "1.1.60" }
and I am getting an unresolved reference 😞 even though I have seen some examples that do that
instead I have to do this:
var kotlin_version: String by extra
kotlin_version = "1.1.60"
am I doing something wrong?jlleitschuh
11/20/2017, 2:13 PMcarolos
11/20/2017, 5:11 PMgradle test
I am using JUnit 5. Is JUnit 5 supported? Any idea what I need to make it detect my tests?user
11/20/2017, 5:44 PMCzar
11/20/2017, 6:56 PMplugins {}
improvements?user
11/20/2017, 8:04 PMCzar
11/21/2017, 11:21 AMapi
in dependencies {
api(...)
}
is still not being resolved, strange because implementation(...)
is and works.tapchicoma
11/22/2017, 8:39 AMeskatos
11/22/2017, 8:44 AMkotlin-dsl
includes extensions to work around the missing overloads upstream
I just tried locally and it worked, what is not working exactly?lewis
11/22/2017, 9:51 AMbamboo
11/23/2017, 7:03 PMcompile(kotlin("stdlib"))
dependency version to match what they find in the build environment (which is wrong)Eugen Martynov
11/23/2017, 8:11 PMCarsten L
11/24/2017, 9:33 AMDomainObjectCollection.withType
in Kotlin DSL?
my example when writing a Plugin :
project.run {
repositories.withType(MavenArtifactRepository::class.java) {
// I want to access the typed repo
dostuff( this)
}
}
what Building gives me:
Error:(22, 44) Kotlin: Type mismatch: inferred type is Project but MavenArtifactRepository was expected
I tried this@withType
but that just yields: ‘this’ is not defined in this context.
Can anyone hint me how to do this?apomelov
11/24/2017, 1:46 PMorg.hidetake.ssh
plugin and caught "Failed to compile accessors" after add it to plugin { }
section. Tried to google for it, found this issue: https://github.com/gradle/kotlin-dsl/issues/447, but not sure it is my case. Any ideas to work this around?velikodniy
11/24/2017, 2:29 PMvelikodniy
11/24/2017, 2:29 PMmkobit
11/24/2017, 5:52 PM