Ola Adolfsson
08/22/2020, 5:21 PMRodrigo Silva
08/23/2020, 1:56 PM/src/java
and /src/kotlin
. Where do I change this setting, so that it stops automatically creating that path?colintheshots
08/24/2020, 3:43 PMimplementation("org.gradle.kotlin:plugins:1.3.6")
is causing incompatibilities with the 1.4.0 Kotlin Gradle plugin because it depends upon 1.3.72. I don't see a newer version out.droid
08/24/2020, 9:06 PMSinan Kozak
08/25/2020, 3:02 PMkts
usage for gradle build. We have 140+ modules and we started migrating to kts
from groovy. But our configuration time on CI with fresh project has increased a lot. One kts
file takes almost 1.5 seconds to compile. So it is not scalable, it is not parallel or it doesnt support remote cache. I wonder, is there any planned significant improvement or should we migrate back to groovy?Kirill Vasilenko
08/26/2020, 11:04 AMdarkmoon_uk
08/26/2020, 2:08 PMMarian Schubert
08/28/2020, 4:03 PMw: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
/home/maio/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.4.0/aa2101a19d8688e368ae6e35e8967550ced73884/kotlin-reflect-1.4.0.jar (version 1.4)
/home/maio/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.4.0/e3765b66f0610afc92053ff1a93a87a544fca2b/kotlin-stdlib-jdk8-1.4.0.jar (version 1.4)
/home/maio/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.3.72/3adfc2f4ea4243e01204be8081fe63bde6b12815/kotlin-stdlib-jdk7-1.3.72.jar (version 1.3)
/home/maio/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.72/8032138f12c0180bc4e51fe139d4c52b46db6109/kotlin-stdlib-1.3.72.jar (version 1.3)
/home/maio/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.72/6ca8bee3d88957eaaaef077c41c908c9940492d8/kotlin-stdlib-common-1.3.72.jar (version 1.3)
Any idea why this may happen?Javier
08/28/2020, 8:38 PMursus
08/28/2020, 11:34 PMiari
08/30/2020, 9:35 AMorg.gradle.cache.CacheOpenException: Could not open cache directory a12qv6mvmtxif3x5d88rky5rk (C:\Gradle\caches\6.6\gradle-kotlin-dsl\a12qv6mvmtxif3x5d88rky5rk)which is caused by
Caused by: java.lang.IllegalArgumentException: org.gradle.api.internal.initialization.DefaultClassLoaderScope@7c5064e5 must be locked before it can be used to compute a classpath!I tried delting the content of
/build
folders in all projects/subprojects and all caches in C:\Gradle\caches\
.
Found this:
https://github.com/gradle/gradle/issues/4823
But to the best of my knowledge, configure-on-demand isn't a thing anymore and I think that i am not using evaluationDependsOn
I don't know how to proceed from here.Javier
08/31/2020, 4:41 PMorg.gradle.parallel = true
Mouaad
09/03/2020, 9:45 AMexplicitApi
to main only (but not for test) using freeCompilerArgs
?Davide Giuseppe Farella
09/06/2020, 7:22 AMgradle.settings.kts
, but the following problem:
• Android Studio doesn’t work well with multiplatform projects yet
• Cannot use IntelliJ because I got an Android module with Compose and AGP 4.2, so I got This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.2 or newer.
So I’d like to exclude that Android module when I’m on IntelliJorafaaraujo
09/07/2020, 1:24 PMGiovani Guerra
09/07/2020, 6:11 PMsourceSets.all {
java.srcDir("src/$name/kotlin")
}
Dmitry Motyl
09/08/2020, 10:53 AMjanvladimirmostert
09/12/2020, 9:54 AMplugins {
application
kotlin("jvm").version("latest")
maven
}
Rob Elliot
09/14/2020, 2:39 PMbuildSrc/src/main/kotlin
access a constant in buildSrc/build.gradle.kts
?
At the moment I have
plugins {
kotlin("jvm") version "1.4.10"
}
in buildSrc/build.gradle.kts
and const val kotlinVersion = "1.4.10"
in buildSrc/src/main/kotlin/DependencyVersions.kt
and having to change two files to update kotlin universally rather than one is irritating me.KV
09/15/2020, 5:15 AM//INCORRECT
viewModel.liveData.observe(this, Observer {
launch(url(
locale = Locale.getDefault().language,
appName = APP_NAME), window.decorView.rootView) })
//CORRECT
viewModel.liveData.observe(this, Observer {
launch(
url(locale = Locale.getDefault().language, appName = APP_NAME),
window.decorView.rootView
)
})
jean
09/15/2020, 7:59 PMallprojects {
repositories {
google()
jcenter()
maven {
name = "GitHubPackages"
url = uri("<https://maven.pkg.github.com/beiningbogen/statemachine>")
credentials {
username = project.extra["gpr.user"].toString()
password = project.extra["gpr.key"].toString()
}
}
}
}
...
dependencies {
implementation("no.beiningbogen.StateMachine-jvm:statemachine-jvm:0.1.1")
}
but I keep getting Failed to resolve: no.beiningbogen.StateMachine-jvm:statemachine-jvm:0.1.1
Is there a specific thing I need to do with the kotlin dsl to be able to use Maven Pom style dependencies?peekandpoke
09/16/2020, 10:01 PM> Task :meta:kaptKotlin FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':meta:kaptKotlin'.
> java.util.zip.ZipException: error in opening zip file
I am using gradle 6.6.1.
------------------------------------------------------------
Gradle 6.6.1
------------------------------------------------------------
Build time: 2020-08-25 16:29:12 UTC
Revision: f2d1fb54a951d8b11d25748e4711bec8d128d7e3
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 1.8.0_252 (Oracle Corporation 25.252-b09)
OS: Linux 5.4.0-7642-generic amd64
Does anyone have an idea what is going on? I somehow suspect, that the jar file is not created and can therefore not be opened.
What should I look for in the gradle logs?
Does it matter that the Kotlin version packaged with gradle is 1.3.72?Daniele B
09/17/2020, 1:16 PMCannot resolve external dependency org.jetbrains.kotlin:kotlin-stdlib-js:1.4.10 because no repositories are defined.
In my gradle.build.kts file, I actually have not even specified the version:
implementation(kotlin("stdlib-js"))
how can I fix this issue?Isaac
09/18/2020, 9:50 AMgradle.properties
file and got a reference in the build.gradle.kts
file by declaring a global property:
val api_key: String by project
I want to use api_key
in my Main.kt
, but I can't seem to figure out how to gain access. Searched on StackOverflow and all the results were android related. Can anyone help?Daniele B
09/18/2020, 6:41 PMExecution failed for task ':shared:jsPackageJson'.
> NPM Dependencies already resolved and installed
at org.jetbrains.kotlin.gradle.targets.js.npm.KotlinNpmResolutionManager.requireConfiguringState$kotlin_gradle_plugin(KotlinNpmResolutionManager.kt:122)
at org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinPackageJsonTask.getCompilationResolver(KotlinPackageJsonTask.kt:26)
at org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinPackageJsonTask.getPackageJson(KotlinPackageJsonTask.kt:50)
any idea?Simon Kågedal Reimer
09/19/2020, 7:28 PMimplementation "org.jetbrains.kotlin:kotlin-reflect:1.4.10"
I would love for the version string here to not contain another hardcoded "1.4.10", but to use whatever the plugin version is at. Is there anyway to do this? We use Groovy Gradle.Allan Wang
09/21/2020, 2:56 AMimplementation
. Is there a way around that?Allan Wang
09/23/2020, 6:42 AMresources/META-INF/gradle-plugins/
from a dsl under build.gradle
? Similar to how jar creation can specify the manifest info in build.gradle
Tower Guidev2
09/23/2020, 1:43 PMmy_app
and not app
How can I configure my settings.gradle
to allow my my_app
module be an alias for app
why isnt this enough ? project(':my_app').projectDir = new File(settingsDir, 'app')
Shan
09/25/2020, 5:53 AMbuildSrc
folder can no longer access the Gradle api. For example:
//directory: buildsrc/src/main/kotlin/Util.kt
import org.gradle.api.*
fun Project.foo() = doBar()
Project
comes up as unresolved. I recently updated to Kotlin 1.4.10 and Gradle 6.6.1, and this is a multi-module project. The `buildSrc`'s build.gradle.kts
file is as it's always been, no changes:
plugins {
`kotlin-dsl`
}
repositories {
jcenter()
}
Any idea what might have caused this, and how I might resolve it? When I try to access project.foo()
from a separate module's build.gradle.kts
file, it hits me with a:
Overload resolution ambiguity. All these functions match.
error, and then when I try to go to the declaration it wants me to choose between the actual file that it's declared in (buildSrc/src/main/kotlin/Util.kt
), and the decompiled java class file.
I suspect some change was made in Gradle 6.6.1 with buildSrc dependencies or something but cannot for the life of me figure out what that might be that could be causing this. I've tried explicitly adding the gradleApi()
dependency as well, but no dice. Any help would be appreciated!Shan
09/25/2020, 5:53 AMbuildSrc
folder can no longer access the Gradle api. For example:
//directory: buildsrc/src/main/kotlin/Util.kt
import org.gradle.api.*
fun Project.foo() = doBar()
Project
comes up as unresolved. I recently updated to Kotlin 1.4.10 and Gradle 6.6.1, and this is a multi-module project. The `buildSrc`'s build.gradle.kts
file is as it's always been, no changes:
plugins {
`kotlin-dsl`
}
repositories {
jcenter()
}
Any idea what might have caused this, and how I might resolve it? When I try to access project.foo()
from a separate module's build.gradle.kts
file, it hits me with a:
Overload resolution ambiguity. All these functions match.
error, and then when I try to go to the declaration it wants me to choose between the actual file that it's declared in (buildSrc/src/main/kotlin/Util.kt
), and the decompiled java class file.
I suspect some change was made in Gradle 6.6.1 with buildSrc dependencies or something but cannot for the life of me figure out what that might be that could be causing this. I've tried explicitly adding the gradleApi()
dependency as well, but no dice. Any help would be appreciated!no
09/25/2020, 12:39 PM