iamthevoid
08/02/2021, 10:58 AMdistributionUrl=https\:<//services.gradle.org/distributions/gradle-7.0.2-bin.zip>
, and AGP version is 7.0.0
Tomasz Krakowiak
08/02/2021, 11:37 AMjeggy
08/02/2021, 1:02 PMkevindmoore
08/03/2021, 8:01 PMiamthevoid
08/04/2021, 12:20 PM./gradlew build
if failsPHondogo
08/05/2021, 8:09 AMIaroslav Postovalov
08/05/2021, 10:32 AMkotlinx
to add dependencies in group org.jetbrains.kotlinx
?
Possible use cases:
1. Adding dependencies by github.com/Kotlin
dependencies {
implementation(kotlinx("coroutines-core", "1.5.1"))
}
2. Adding plugins by github.com/Kotlin
plugins {
kotlinx("benchmark") version "0.3.1"
}
mattinger
08/05/2021, 6:23 PMursus
08/06/2021, 12:01 AMExecution optimizations have been disabled for task ':radost:user:discount:impl:kspDebugKotlin' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: 'C:\Users\ursus\AndroidStudioProjects\mo2-android\radost\user\discount\impl\build\generated\sqldelight\code\AppDatabase\debug'. Reason: Task ':radost:user:discount:impl:kspDebugKotlin' uses this output of task ':radost:user:discount:impl:generateDebugAppDatabaseInterface' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to <https://docs.gradle.org/7.1.1/userguide/validation_problems.html#implicit_dependency> for more details about this problem.
Tomas Kormanak
08/06/2021, 10:11 AMChristopher Elías
08/06/2021, 6:06 PMA problem occurred evaluating script.
> Failed to apply plugin 'com.android.internal.library'.
> The option 'android.enableR8' is deprecated.
It was removed in version 7.0 of the Android Gradle plugin.
Should I just remove it from gradle.properties? how to enable r8 now?FunkyMuse
08/07/2021, 12:17 PMturansky
08/07/2021, 11:37 PMsrc/generated/kotlin
?robstoll
08/08/2021, 12:31 PMJason Ankers
08/09/2021, 3:34 AMWilliam Reed
08/09/2021, 1:43 PMIncompatible because this component declares an API of a component compatible with Java 16 and the consumer needed a runtime of a component compatible with Java 11
any other suggestions to try?robstoll
08/10/2021, 11:32 AMAaron Todd
08/10/2021, 2:16 PMguava-jre
and guava-android
as an example where using attributes would be a better solution. If you wanted to do something like this (publish a regular jvm version and an android specific version of a library) what are the appropriate attributes to set? It vaguely mentions org.gradle.jvm.version
but I'm not seeing any properties specific to android...robstoll
08/11/2021, 3:26 PMsuresh
08/15/2021, 7:12 PMkotlinDaemonJvmArgs
to open modules on JDK16+ ? I have tried all different options (gradle.properties and in dsl) , nothing seems to work.Alexandre Brown
08/16/2021, 11:33 AMJustin Yue
08/18/2021, 5:58 AMjava.lang.ClassNotFoundException
. I believe the issue has to do with my build.gradle.kts file, which I'll put in a thread below.jean
08/19/2021, 8:29 AMrepositories {
google()
mavenCentral()
maven {
url = uri("<https://maven.pkg.jetbrains.space/org1/p/dep1/maven>")
name = "name1"
credentials(PasswordCredentials::class)
}
maven {
url = uri("<https://maven.pkg.jetbrains.space/org2/p/dep2/maven>")
name = "name2"
credentials(PasswordCredentials::class)
}
}
Gradle can resolve one at a time, but if I add both and build, it fails on the second one. Am I missing something here?JinYong Kim
08/19/2021, 9:48 AMdependencySubstitution {
// substitute(module("$group:${rootProject.name}")).using(project(":"))
all {
(requested as? ModuleComponentSelector)?.let {
if (it.group != rootProject.group) {
return@let
}
val targetProject = if (it.module == rootProject.name) {
rootProject
} else {
findProject(":${it.module}")
} ?: return@let
useTarget(targetProject)
}
}
}
*Dependency Definition (build.gr*adle.kts in sub-project)
https://github.com/jdekim43/j-logger/blob/662882bfe47ba2d19be904d030403ab154af824e/coroutine/build.gradle.kts#L24
implementation("$group:${rootProject.name}:$version")
// It dependent root project
Ben Madore
08/20/2021, 3:13 PM[INFO] [org.gradle.api.Task] i: starting the daemon as: /Users/ben.madore/dotfiles/sdkman/.sdkman/candidates/java/11.0.11.hs-adpt/bin/java -cp /Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.5.21/40ddbcae9ff100473f95370c2d589ba3fc48eed5/kotlin-compiler-embeddable-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.5.21/802f1f39735ae1eb2b75714a40fa19bb2e687e96/kotlin-reflect-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.21/2f537cad7e9eeb9da73738c8812e1e4cf9b62e4e/kotlin-stdlib-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-script-runtime/1.5.21/96d49e89873fde985750af354b6eabb60cfa999b/kotlin-script-runtime-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-daemon-embeddable/1.5.21/17255809e66a940dfdf6289bccbdfb5a09f3145/kotlin-daemon-embeddable-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.intellij.deps/trove4j/1.0.20181211/216c2e14b070f334479d800987affe4054cd563f/trove4j-1.0.20181211.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.21/cc8bf3586fd2ebcf234058b9440bb406e62dfacb/kotlin-stdlib-common-1.5.21.jar -Djava.awt.headless=true -Djava.rmi.server.hostname=127.0.0.1 -Xmx8g -XX:MaxMetaspaceSize=512m -Dkotlin.environment.keepalive -ea org.jetbrains.kotlin.daemon.KotlinCompileDaemon --daemon-runFilesPath /Users/ben.madore/Library/Application Support/kotlin/daemon --daemon-autoshutdownIdleSeconds=7200 --daemon-compilerClasspath /Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.5.21/40ddbcae9ff100473f95370c2d589ba3fc48eed5/kotlin-compiler-embeddable-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.5.21/802f1f39735ae1eb2b75714a40fa19bb2e687e96/kotlin-reflect-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.21/2f537cad7e9eeb9da73738c8812e1e4cf9b62e4e/kotlin-stdlib-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-script-runtime/1.5.21/96d49e89873fde985750af354b6eabb60cfa999b/kotlin-script-runtime-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-daemon-embeddable/1.5.21/17255809e66a940dfdf6289bccbdfb5a09f3145/kotlin-daemon-embeddable-1.5.21.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.intellij.deps/trove4j/1.0.20181211/216c2e14b070f334479d800987affe4054cd563f/trove4j-1.0.20181211.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/Users/ben.madore/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.21/cc8bf3586fd2ebcf234058b9440bb406e62dfacb/kotlin-stdlib-common-1.5.21.jar
[INFO] [org.gradle.api.Task] i: Received the message signalling that the daemon is ready
[INFO] [org.gradle.api.Task] i: new daemon started, trying to find it
[INFO] [org.gradle.api.Task] i: found daemon on port 17510 (17 ms old), trying to connect
[INFO] [org.gradle.api.Task] i: cannot connect to registry: org.jetbrains.kotlin.daemon.common.LoopbackNetworkInterface$ClientLoopbackSocketFactory; local class incompatible: stream classdesc serialVersionUID = -6143155864063642633, local class serialVersionUID = 2267640376242766426
[INFO] [org.gradle.api.Task] i: found fresh run file '/Users/ben.madore/Library/Application Support/kotlin/daemon/kotlin-daemon.2021-08-20T15-08-02.424Z.debbf6008f685b009aa37af9e022bc5e.17510.run' (17 ms old), but no daemon, ignoring it
which then repeats a few times before pringing the fallback messageZac Sweers
08/20/2021, 4:08 PMeygraber
08/25/2021, 11:59 PMfun Project.containsDependency(name: String) =
configurations
.named("implementation")
.get()
.dependencies
.any { dependency -> name in dependency.name } ||
project
.configurations
.named("api")
.get()
.dependencies
.any { dependency -> name in dependency.name }
I really don't like this approach. Is there a better one?hfhbd
08/26/2021, 8:21 AMcompileProductionLibraryKotlinJs --debug -Pkotlin.verbose=true
does not print any (useful) compiler outputs in GradleEugene
08/26/2021, 8:48 AMtasks.withType<KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-opt-in=org.mylibrary.OptInAnnotation"
}
Option #2 - using sourceSet
sourceSets {
all {
languageSettings.optIn("org.mylibrary.OptInAnnotation")
}
}
Please vote and leave your WHY in thread. Thanksmbonnin
08/26/2021, 4:06 PM'compileJava' task (current target is 11) and 'compileKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
Except that I don't have any java source in this project. Can I disable the javaCompile task somehow?mbonnin
08/26/2021, 4:06 PM'compileJava' task (current target is 11) and 'compileKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
Except that I don't have any java source in this project. Can I disable the javaCompile task somehow?edrd
08/26/2021, 4:27 PMtasks.withType<JavaCompile> {
onlyIf { false }
}
mbonnin
08/26/2021, 4:29 PMedrd
08/26/2021, 4:30 PMmbonnin
08/26/2021, 4:31 PMtargetCompatibility = 1.8
in my gradle script but that feels kind of misleading since there's no java to be foundedrd
08/26/2021, 4:34 PMmbonnin
08/26/2021, 4:36 PMVampire
08/27/2021, 10:42 AMenabled = false
over onlyIf { false }
:-)edrd
08/27/2021, 12:10 PMenabled
Dariusz Kuc
08/27/2021, 10:11 PM1.5.30
(multi module pure kotlin project)...
I'm using SDKMAN and got both Java 8 and 11 (default) installed locally - when I set the toolchain version to Java 8 kapt blew up (when processing spring annotation) unable to find java.lang
packages - without toolchain config it run fine just with the warning above.
Might be unrelated but my test android (using Android tools 7.0.1) build also blew up on version update (without setting java toolchain) with Cannot have abstract method KotlinJavaToolchain.getJdk()
- works fine with 1.5.21
tapchicoma
09/06/2021, 9:02 AMkotlin.jvm.target.validation.mode=ignore
into gradle.properties
mbonnin
09/06/2021, 9:03 AMtapchicoma
09/06/2021, 9:03 AMthere is a bug that KGP creates java tasks as well when no java sources are available.Actually KGP apply
java-library
plugin, but should not trigger creation of registered Java tasks when Java sourceset is empty