ubu
02/27/2019, 6:46 PMTasos Stamadianos
02/28/2019, 1:04 AMdarkmoon_uk
02/28/2019, 10:45 AMNikky
03/01/2019, 6:58 PM*.kts
from files that gradle tries to compile ?Tasos Stamadianos
03/02/2019, 7:51 PMLib
, which uses Jackson, and a client which uses Lib
. If I try to make any calls in Lib
which involve some Jackson calls under the hood, I get some exceptions related to Jackson not being able to load modules. The only way to fix this is to also include Jackson as a dependency in my client application, even tho it's already a dependency in Lib
. Am I missing something here?Marc Knaup
03/04/2019, 4:42 AMkotlin-dsl
1.2.4 and 1.2.5 broken?
$ ./gradlew tasks --stacktrace
> Configure project :
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.3.20` that might work differently than in the requested version `1.3.21`.
FAILURE: Build failed with an exception.
…
java.lang.NoClassDefFoundError: org/gradle/kotlin/dsl/provider/PrecompiledScriptPluginsSupport
at org.gradle.kotlin.dsl.plugins.precompiled.PrecompiledScriptPlugins.apply(PrecompiledScriptPlugins.kt:77)
at org.gradle.kotlin.dsl.plugins.precompiled.PrecompiledScriptPlugins.apply(PrecompiledScriptPlugins.kt:40)
Alexander Mikhalchenko
03/04/2019, 7:51 AMlouiscad
03/04/2019, 11:15 AMbuild.gradle.kts
should fix your issue: https://github.com/LouisCAD/Splitties/blob/61a4035ba3b18270dbfb0828436b5045bff44919/buildSrc/build.gradle.kts#L32-L41GarouDan
03/04/2019, 8:09 PMbuild.gradle.kts
format.
Does someone knows how to do that?
task jsinterop(type: Exec) {
workingDir projectDir
def ext = MPPTools.isWindows() ? '.bat' : ''
def distributionPath = project.properties['org.jetbrains.kotlin.native.home'] as String
if (distributionPath != null) {
def jsinteropCommand = Paths.get(file(distributionPath).path, 'bin', "jsinterop$ext").toString()
inputs.property('jsinteropCommand', jsinteropCommand)
inputs.property('jsinteropPackageName', packageName)
outputs.file(jsinteropKlibFileName)
commandLine jsinteropCommand,
'-pkg', packageName,
'-o', jsinteropKlibFileName,
'-target', 'wasm32'
} else {
doFirst {
// Abort build execution if the distribution path isn't specified.
throw new GradleException("""\
|Kotlin/Native distribution path must be specified to build the JavaScript interop.
|Use 'org.jetbrains.kotlin.native.home' project property to specify it.
""".stripMargin())
}
}
}
tasks.withType(KotlinNativeCompile).all {
dependsOn jsinterop
}
Where I’m using this kotlin project as a basis:
https://github.com/JetBrains/kotlin-native/blob/master/samples/html5Canvas/build.gradlemp
03/05/2019, 6:08 PMmodule-info.java
in a project (a simple Java project using the java-library
plugin), IntelliJ gets super mad about basically everything in build.gradle.kts
. Every element is red with Symbol is declared in unnamed module which is not read by this module
. Is this expected, or is there some setting I can tweak?thomasnield
03/06/2019, 9:19 PMthomasnield
03/06/2019, 9:26 PMsitepodmatt
03/07/2019, 4:28 AMadalbert
03/07/2019, 11:09 PMdep.transitive
. The interface Dependency
does not include anything with transitive
. I am not sure how to port this groovy fragment to kotlin dslbjartek
03/14/2019, 7:27 AMcompileTestGroovy.dependsOn compileTestKotlin
compileTestGroovy.classpath += files(compileTestKotlin.destinationDir)
testClasses.dependsOn compileTestGroovy
cfleming
03/18/2019, 1:53 AMcompileKotlin
task seems to be different to the one used by Gradle itself. It’s somehow related to the version of the gradle-intellij-plugin I’m using to build an IntelliJ plugin - currently I use 0.3.10 of the plugin and everything in my build script should be set to use Java 8 to compile. However when I upgrade to 0.5.0-SNAPSHOT of the plugin because I need to test my plugin against the new Java 11 JBSDK, I start getting compile errors like:
> Task :compileKotlin FAILED
e: /Users/colin/dev/cursive/src/main/kotlin/cursive/debugger/Fragment.kt: (95, 25): Cannot access class 'com.sun.jdi.StringReference'. Check your module classpath for missing or conflicting dependencies
indicating that my Kotlin code is being compiled with some 9+ JDK.cfleming
03/18/2019, 4:58 AMJustin
03/18/2019, 5:20 AMjakiej
03/21/2019, 12:37 AMbuild.gradle.kts
plugins {
id("a")
}
apply(from = "b.gradle.kts")
---------------
b.gradle.kts
val c = A() //A is a class defined in plugin "a" and how do I make it accessible here?
wakingrufus
03/21/2019, 1:53 AMmp
03/21/2019, 7:37 AMval debugPort = "8000"
enum class JreVersion( val value: String, val debugString: String = "", val additionalDependencies: DependencyHandlerScope.() -> Unit = {} ) {
Eleven(value = "11.0.2-jre-slim",
debugString = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:$debugPort",
additionalDependencies = {
implementation("org.glassfish.jaxb:jaxb-runtime")
}
)
}
won’t compile with Don't know how to generate outer expression: Class: class JreVersion
I`m not sure should I report this as bug or not but seems that - something goes wrong because I`m expecting top level value defined before class to be accessible from class bellowefemoney
03/25/2019, 2:46 PMinline fun PluginDependenciesSpec.android(type: String = "application") = id("com.android.$type")
to be used in the plugins
block like
plugins {
android() // OR
android("library")
}
jrod
03/25/2019, 7:39 PMval compileKotlinTask = project.tasks.named("compileKotlin") as TaskProvider<KotlinCompile>
compileKotlinTask.configure {
it.source(javaOutDirs) // javaOutDirs is where the java protos are generated
it.dependsOn(wireTask)
}
but my gradle output shows:
14:56:58.695 [DEBUG] [org.gradle.api.Task] [KOTLIN] all kotlin sources: src/main/java/com/squareup/dinosaurs/Sample.kt
14:56:58.695 [DEBUG] [org.gradle.api.Task] [KOTLIN] compileKotlin source roots: [
/...src/test/projects/kotlin-project-java-protos/src/main/java/com/squareup/dinosaurs/Sample.kt]
14:56:58.695 [DEBUG] [org.gradle.api.Task] [KOTLIN] compileKotlin java source roots: [
// why empty?!
]
aandreyev
03/28/2019, 2:14 PMBen Madore
03/28/2019, 8:28 PMplugins {
id("java-library")
kotlin("jvm") version "1.3.21"
id("nebula.info-dependencies") version ("5.0.0")
id("org.owasp.dependencycheck") version ("4.0.2")
id("com.gorylenko.gradle-git-properties") version ("2.0.0")
id("io.freefair.lombok") version ("3.2.0")
}
configure<JavaPluginConvention> { // config built-in works fine
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
configure<GitPropertiesPluginExtension> { // FAIL Unresolved reference: GitPropertiesPluginExtension
dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
dateFormatTimeZone = "UTC"
}
Shan
03/29/2019, 9:33 AMCannot resolve external dependency org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.20 because no repositories are defined.
Required by:
project :
Shan
03/29/2019, 9:38 AMBen Madore
03/29/2019, 1:58 PMio.spring.dependency-management
plugin in the root project) and versions stored in gradle.properties
Smallville7123
03/30/2019, 12:42 AMigor.wojda
03/30/2019, 1:38 PMtask("prCheck") {
afterEvaluate {
// Non-android modules do not have lint task
val lintDependencies = subprojects.mapNotNull { "${it.name}:lint" }
val taskDependencies = mutableListOf<String>("ktlintCheck", "detekt", "testDebugUnitTest")
taskDependencies.addAll(lintDependencies)
dependsOn(taskDependencies)
}
}
Above task works well for android lint, detekt, ktlint, however it fails to resolve testDebugUnitTest
task 🤔
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':prCheck'.
> Task with path 'testDebugUnitTest' not found in root project 'android'.