x80486
12/13/2017, 3:44 PM1.2
(without the .0
in the end)mkobit
12/13/2017, 3:44 PMpluginManagement
dsl if you want to use JUnit 5 plugin in the plugins {}
block - see https://github.com/junit-team/junit5/issues/768#issuecomment-330078905 for thatkartikpatodi
12/13/2017, 3:49 PMkartikpatodi
12/13/2017, 5:12 PMmkobit
12/13/2017, 6:58 PMapi(kotlin("stdlib-jre8"))
and running ./gradlew genPom
with the maven-publish
plugin and getting a dependency without the version?
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId>
<scope>compile</scope>
</dependency>
Dmitry Kandalov
12/13/2017, 11:00 PMbuild.gradle.kts
?
sourceSets {
main {
java { srcDir "./src" }
kotlin { srcDir "./src" }
resources { srcDir "./resources" }
}
test {
kotlin { srcDir "./test" }
}
}
Marcel Overdijk
12/14/2017, 5:31 PMbuild.gradle
I typically define (reusable) ext properties in my build scripts like:
buildscript {
ext {
javaVersion = "1.8"
kotlinVersion = "1.2.0"
springBootVesion = "2.0.0.M7"
querydslVersion = "4.1.4"
querydslGradlePluginVersion = "1.0.8"
}
And the I can refer to these properties when declaring plugins and dependencies.
What is the proper way to this within Kotlin DSL?bamboo
12/14/2017, 6:18 PMbuildSrc
nikolaymetchev
12/14/2017, 8:53 PMmodule not found: org.jetbrains.kotlin#kotlin-stdlib;${kotlin.version}
lukas
12/15/2017, 7:50 AMgradle.ext
that I can use to make values from settings.gradle.kts available to build.gradle.kts?anstaendig
12/16/2017, 11:20 AMaraqnid
12/19/2017, 2:21 AMsettings.gradle.kts
operator fun Settings.get(key: String): String {
return javaClass.getMethod("getProperty", String::class.java).invoke(this, key) as String
}
and then referring to settings["property"]
for examplelukas
12/19/2017, 9:26 AMarchivesBaseName
? I saw some scripts using base { archivesBaseName = ".." }
but can’t get that work.. always get the following compile error - even though it get’s recognized and resolved in the editor in IntelliJ
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val PluginDependenciesSpec.base: PluginDependencySpec defined in org.gradle.kotlin.dsl
mkobit
12/20/2017, 2:58 PMcarrot
12/20/2017, 6:12 PMclasspath("javax.xml.bind:jaxb-api:2.3.0")
this in my buildscript dependencies workedxenoterracide
12/21/2017, 3:24 AMxenoterracide
12/21/2017, 5:24 AMcheckstyle {
toolVersion = "8.4"
sourceSets.forEach( { println(it) })
sourceSets.removeIf( { it.name == "test" })
}
xenoterracide
12/21/2017, 6:54 AMxenoterracide
12/21/2017, 7:54 AMpublishing {
repositories {
maven {
url = uri(System.getenv("JRS_S3_URI") ?: "" )
xenoterracide
12/21/2017, 8:28 AMxenoterracide
12/21/2017, 9:08 AMgradle publish
xenoterracide
12/21/2017, 9:12 AMxenoterracide
12/21/2017, 10:46 AMxenoterracide
12/21/2017, 11:50 AMtrubesv
12/21/2017, 2:28 PMaraqnid
12/21/2017, 2:38 PMlanguage: java
set in the control file and a Gradle wrapper to specify a recent Gradle version (e.g. https://travis-ci.org/araqnid/fuel-log runs on 8 and 9)Marcel Overdijk
12/22/2017, 9:48 AMxenoterracide
12/22/2017, 2:35 PMSystem.getenv("JRS_S3_URI")?.let {
val sourcesJar by tasks.creating(Jar::class) {
classifier = "sources"
from(java.sourceSets["main"].allSource)
}
publishing {
repositories {
maven {
url = uri(it)
credentials(AwsCredentials::class.java) {
accessKey = System.getenv("JRS_ACCESSKEYID")
secretKey = System.getenv("JRS_SECRETACCESSKEY")
}
}
}
(publications) {
"mavenJava"(MavenPublication::class) {
from(components["java"])
artifact(sourcesJar)
}
}
}
}
from the gradle version? I don't get why it's AwsCredentials::class.java
or even what the java is at all, or why publications is
(publications) {
"mavenJava"(MavenPublication::class) {
like literally If I hadn't copied it, I would never have figured it out from what I hadxenoterracide
12/22/2017, 2:43 PMxenoterracide
12/23/2017, 8:17 AMconfigurations { driver }
dependencies { driver 'org.xerial:sqlite-jdbc:3.7.2' }`