algo112
04/20/2021, 8:28 AMallprojects {
// Add this to remove limit of 100 build error
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "4000"
options.compilerArgs << "-Xmaxwarns" << "4000"
}
}
afterEvaluate {
if (project.plugins.hasPlugin("kotlin-kapt")) {
kapt {
javacOptions {
option("-Xmaxerrs", 10000)
}
}
}
}
}
Wojciech Zięba
04/20/2021, 3:51 PMlibA
and libB
. In libA
I apply org.jetbrains.kotlin.android
and in libB
: org.jetbrains.kotlin.jvm
. Plugins are managed via pluginManagement { ... }
in settings.gradle
.
The issue I have is that Kotlin Gradle plugin prints out a warning that The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
Is it a false positive or plugin has been indeed loaded two times? If yes - why? And what is the suggested way to use Kotlin Gradle Plugin with Plugin DSL?
Issue with reproduction project is available hereAaron Todd
04/20/2021, 5:17 PMPaul Woitaschek
04/21/2021, 5:41 AMdependencies {
implementation(libs.dagger.runtime)
}
With:
Could not find method implementation() for arguments [provider(?)]
Is there any way to fix this without moving it to afterEvaluate?eygraber
04/23/2021, 2:22 AMiamthevoid
04/23/2021, 8:00 AMconcreteVersion
value in script?Anton Afanasev
04/23/2021, 3:51 PMiari
04/25/2021, 12:34 PMplugins {
base
//kotlin("jvm") version "1.4.32" apply false
kotlin("js") version "1.4.32" apply false
}
However, the frontend sub-project will fail with
Please initialize the Kotlin/JS target in 'logoleon-manager (:logoleon-manager)'. Use:
kotlin {
js {
// To build distributions and run tests for browser or Node.js use one or both of:
browser()
nodejs()
}
}Even though it is configured exactly like that. Whats wrong? SO post: => https://stackoverflow.com/questions/67254937/gradle-multi-module-kotlin-project
basher
04/25/2021, 6:54 PMHexa
04/27/2021, 12:59 PMtask unitTest( type: Test ) {
exclude '**/cucumber/**'
}
Hexa
04/27/2021, 1:00 PMtasks {
named<Test>("unitTest") {
exclude("**/*cucumber*")
}
}
iamthevoid
04/27/2021, 1:37 PMshared
module and feature-modules.
shared
• androidMain
• commonMain
• commonTest
• iosMain
feature1
• commonMain
• commonTest
feature2
• commonMain
• commonTest
i want to use code from shared-commonTest in featureN-commonTest. When i implement shared module in feature module i haven’t this possibility even if i implement shared
in featureN commonTest
targetplastiv
04/29/2021, 4:09 PM<http://kotlin.parallel.tasks.in|kotlin.parallel.tasks.in>.project=true
is this flag still relevant?
When I search I see an announcement https://blog.jetbrains.com/kotlin/2019/01/kotlin-1-3-20-released/ but it ain’t listed in current docs anymore https://kotlinlang.org/docs/gradle.htmltrofman
04/30/2021, 6:59 AMkotlinOptions.apiVersion
compiler option will take my kotlin plugin version by default?iamthevoid
04/30/2021, 10:26 AMPlease initialize at least one Kotlin target in
despite the fact all was good on previous version
Now i’ve updated canary 14 to canary 15 (updated AGP plugin as well)
Early i got this error when updated from 13 to 14 (that time it was resolved after reinstalling AS: downgrading to 13 and updating to 14 again). I can try to repeat this way, but it is strange ) Have anyone stucks with that error? Is it happens after each upgrade? How can i fix it?Daniele B
04/30/2021, 4:47 PMDaniele B
04/30/2021, 6:24 PMjmfayard
05/01/2021, 7:52 PMFrancesc
05/03/2021, 6:40 PM- Type 'ArgumentsGenerationTask' property 'applicationId' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
I'm not certain how to address this. Any suggestions? I show the relevant code in the threadManuel Pérez Alcolea
05/04/2021, 3:43 AMgradle init
(or some non-interactive command)? or do I have to do it manually? (I could create one somewhere else, then copy it and fix the graddle.settings, but that's another story)jannis
05/04/2021, 7:28 AMSlackbot
05/04/2021, 4:14 PMtapchicoma
05/05/2021, 9:36 AMeygraber
05/07/2021, 10:06 PMdependencies {
implementation(platform("com.google.firebase:firebase-bom:27.0.0"))
}
Jonathan Olsson
05/08/2021, 8:21 PMconfigure(listOfKotlinProjects) {
...
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
...
}
I'm trying to use a library as a dependency but the consuming library claims Incompatible because this component declares a component compatible with Java 15 and the consumer needed a component compatible with Java 11.eygraber
05/09/2021, 4:59 AMw: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
/home/me/.gradle/wrapper/dists/gradle-7.0-all/9m115ut5nwvtxli7nys8pggfr/gradle-7.0/lib/kotlin-stdlib-1.4.31.jar (version 1.4)
/home/me/.gradle/wrapper/dists/gradle-7.0-all/9m115ut5nwvtxli7nys8pggfr/gradle-7.0/lib/kotlin-stdlib-common-1.4.31.jar (version 1.4)
/home/me/.gradle/wrapper/dists/gradle-7.0-all/9m115ut5nwvtxli7nys8pggfr/gradle-7.0/lib/kotlin-stdlib-jdk7-1.4.31.jar (version 1.4)
/home/me/.gradle/wrapper/dists/gradle-7.0-all/9m115ut5nwvtxli7nys8pggfr/gradle-7.0/lib/kotlin-stdlib-jdk8-1.4.31.jar (version 1.4)
/home/me/.gradle/wrapper/dists/gradle-7.0-all/9m115ut5nwvtxli7nys8pggfr/gradle-7.0/lib/kotlin-reflect-1.4.31.jar (version 1.4)
/home/me/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.5.0/65fbc439df2e4aad1f3769762d54534f1b564090/kotlin-stdlib-jdk8-1.5.0.jar (version 1.5)
/home/me/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.5.0/47806fe8ed30dbdf9e697eda5e9c9a3905ff3363/kotlin-reflect-1.5.0.jar (version 1.5)
/home/me/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.5.0/f61904618ea7be07a66e0545ffe8dc2c70a19b77/kotlin-stdlib-jdk7-1.5.0.jar (version 1.5)
/home/me/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.0/29dae2501ca094416d15af0e21470cb634780444/kotlin-stdlib-1.5.0.jar (version 1.5)
/home/me/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.0/4080d69efca5e39e9b4972f125e40f1607bd6460/kotlin-stdlib-common-1.5.0.jar (version 1.5)
w: Consider providing an explicit dependency on kotlin-reflect 1.5 to prevent strange errors
eygraber
05/09/2021, 12:36 PMbuildSrc
still expected to invalidate all caches? I see that https://github.com/gradle/gradle/issues/2531 is still open, but I just tested making some changes to my buildSrc
and rebuilding, and practically everything came from the cache.Eivind
05/11/2021, 10:31 AMeygraber
05/11/2021, 6:56 PMkotlin-android
plugin results in the following error but the build completes successfully:
Failed to apply plugin [id 'org.jetbrains.kotlin.android']
> Extension with name 'android' does not exist. Currently registered extension names: [ext, kotlin]
Happening in:
Gradle: 7.0 and 7.0.1
Android Gradle Plugin: 4.2.0 and 7.0.0.-alpha15
Kotlin: 1.5.0
https://youtrack.jetbrains.com/issue/KT-25081#focus=Comments-27-4886389.0-0Vivek Modi
05/13/2021, 11:01 AMplugins {
id 'kotlin-parcelize'
}
i am putting this code module:Android.app gradle file but it giving error. Could not compile build file '/Users/ABC/StudioProjects/APPLICATION/app/build.gradle'.
> startup failed:
build file '/Users/ABC/StudioProjects/APPLICATION/app/build.gradle': 9: only buildscript {} and other plugins {} script blocks are allowed before plugins {} blocks, no other statements are allowed