Smallville7123
04/12/2019, 7:16 AMmultiplatform
Smallville7123
04/12/2019, 7:55 AMdwursteisen
04/12/2019, 2:27 PMJar
task that will use all dependencies :
val dist = project.tasks.create("dist", Jar::class.java) {
from(configurations.runtime.map { if (it.isDirectory) it else zipTree(it) })
}
But I got an error:
from(configurations.runtime.map { if (it.isDirectory) it else zipTree(it) })
^ Unresolved reference: isDirectory
If I’m printing the configuration (println(configurations.runtime.javaClass)
), I got that: class org.gradle.api.internal.DefaultNamedDomainObjectCollection$ExistingNamedDomainObjectProvider_Decorated
I would expect something like FileCollection
or Configuration
. What I’m doing wrong? 🤔Icaro Temponi
04/12/2019, 5:37 PMhmole
04/13/2019, 6:29 AMbuildSrc
? I tried putting buildSrc
in my buildSrc
🤯 but sadly it didn't work.Smallville7123
04/14/2019, 4:52 AMSmallville7123
04/14/2019, 10:31 AMImran/Malic
04/16/2019, 6:19 PMImran/Malic
04/17/2019, 9:48 AMPaul Woitaschek
04/17/2019, 9:51 AMNezteb
04/19/2019, 1:53 AMSlackbot
04/19/2019, 2:56 PMSmallville7123
04/19/2019, 4:29 PMe: /home/macropreprocessor/IdeaProjects/kpp/buildSrc/src/main/kotlin/directoryembedder.gradle.kts: (1, 1): Unresolved reference: tasks
/home/macropreprocessor/IdeaProjects/kpp/buildSrc/src/main/kotlin/directoryembedder.gradle.kts: (1, 1): Cannot access script base class 'kotlin.script.templates.standard.ScriptTemplateWithArgs'. Check your module classpath for missing or conflicting dependencies
tasks {
register("directoryEmbedder") {
group = "Directory Embedder"
description = "Directory Embedder"
doLast {
println("hello from Directory Embedder")
}
}
}
Smallville7123
04/19/2019, 4:30 PMbuildSrc/build.gradle.kts
plugins {
`kotlin-dsl`
`java-library`
}
repositories {
jcenter()
}
Smallville7123
04/20/2019, 10:42 AMkotlin find gradle root without using gradle
and first result is <https://kotlinlang.org/docs/reference/using-gradle.html>
-_-Smallville7123
04/20/2019, 11:24 AMSmallville7123
04/20/2019, 6:11 PMNezteb
04/21/2019, 4:05 AMSmallville7123
04/21/2019, 2:04 PM12:03:50 AM: Executing task 'runReleaseExecutableLinux'...
> Configure project :
Kotlin Multiplatform Projects are an experimental feature.
FAILURE: Build failed with an exception.
* Where:
Script '/home/macropreprocessor/IdeaProjects/kpp/pack.kts' line: 6
* What went wrong:
A problem occurred evaluating script.
> Could not find method recDir() for arguments [{current=class java.io.File}, pack_6jwbnzhp0j5onxijf2qveb5gr$_run_closure2@78e7a62e] on root project 'kpp' of type org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 0s
Could not find method recDir() for arguments [{current=class java.io.File}, pack_6jwbnzhp0j5onxijf2qveb5gr$_run_closure2@78e7a62e] on root project 'kpp' of type org.gradle.api.Project.
12:03:50 AM: Task execution finished 'runReleaseExecutableLinux'.
Nezteb
04/21/2019, 5:41 PMbuildscript
rook
04/22/2019, 4:42 PMsrc/test/java/
, src/mock/java
, and src/main/java
. When I add these sources to the test
source set and run ./gradlew test -i
from the command line, I don’t see any test results at all.
sourceSets.forEach {
if(it.name.contains("test")) {
it.java.srcDirs("src/test/java/", "src/mock/java")
}
it.java.srcDirs("src/${it.name}/java")
}
Is there something else I should be doing to ensure that my tests actually run?ralf
04/22/2019, 6:09 PMfriend-path
Kotlin compiler argument.sbyrne
04/23/2019, 1:01 AMbuild.gradle.kts
and MyClass.kt
in the project dir. build.gradle.kts
has sourceSets { main { java { setSrcDirs(listOf(".")); exclude( "*.kts" ) } } }
. All works from from command line, but Idea doesn't pick up the project dir as a source dir, and doesn't do code completion in MyClass.kt
.altavir
04/23/2019, 7:11 PMBreadMoirai
04/24/2019, 1:29 AMjanvladimirmostert
04/24/2019, 8:32 AMtasks.withType<KotlinCompile> {
incremental = true
kotlinOptions.jvmTarget = "1.8"
}
builds that usually took 1 minute are now taking 7-15 minutes, not sure if it's due to the code-base growing pass a certain point that's now causing this slowdown, new intellij version, new kotlin version or any of several dozen permutations of things that could have changed.
i want to see if giving the compiler more memory will speed up compile times or get it back to "normal"janvladimirmostert
04/24/2019, 8:27 PMplugins {
id("org.jetbrains.kotlin.plugin.noarg").version(kotlinVersion)
id("org.jetbrains.kotlin.plugin.jpa").version(kotlinVersion)
}
and then the noArg one i figured out can be configured like this
noArg {
annotation(...)
}
how does one do that for the jpa plugin?
I'm trying to translate this maven to gradle kotlin dsl:
<configuration>
<jvmTarget>${java.version}</jvmTarget>
<compilerPlugins>
<plugin>jpa</plugin>
</compilerPlugins>
<pluginOptions>
<option>jpa:annotation=javax.persistence.MappedSuperclass</option>
</pluginOptions>
</configuration>
snowe
04/24/2019, 9:33 PMhenrik
04/25/2019, 8:12 AMkotlin-allopen
gradle plugin (into a separate repo), but I'm having some early problems: Plugin with id 'jps-compatible' not found.
. I haven't been able to find a repo where that plugin is published, do any of you guys know?henrik
04/25/2019, 1:32 PMhenrik
04/25/2019, 1:32 PMsnowe
04/25/2019, 8:44 PMmavenLocal()
? did you deploy at all? have you made sure that you set up to search mavenLocal for plugins?henrik
04/26/2019, 4:59 AMsnowe
04/26/2019, 3:07 PMexample
until you publish the plugin
module to mavenLocal
. then you can uncomment it.henrik
05/02/2019, 10:45 AMbuildscript
version)GradleRunner
🙂