jeggy
02/24/2021, 7:16 PMscirner
02/24/2021, 11:08 PMproject.afterEvaluate
closure due to how it depends on some subprojects being fully evaluated. How do you get the org.gradle.testfixtures.ProjectBuilder
to force that evaluation? After adding that closure I can no longer see those tasks in my unit tests.Robert
02/25/2021, 9:10 AMCould not find a 'gradlew' script or a 'build.gradle' file! Please check that they exist and are commited to Git.
which is correct, because I use build.gradle.kts
(with .kts).
This is also in the documentation (https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku) but that would mean I HAVE to use gradlew
instead of the wrapper task in gradle?Karlo Lozovina
02/25/2021, 8:34 PMsourceSets {
main {
java.srcDir("main")
}
test {
java.srcDir("test")
}
create("jmh") {
java.srcDir("jmh")
}
}
and the problem is that inside the "jmh" sourceSet I can't import my main classes...tylerwilson
02/26/2021, 2:15 PMplugins {
id("com.android.library")
kotlin("multiplatform")
kotlin("native.cocoapods")
kotlin("plugin.serialization") version "1.4.30"
id("com.chromaticnoise.multiplatform-swiftpackage") version "2.0.3"
}
which gives me this error in AS:
Error resolving plugin [id: 'org.jetbrains.kotlin.plugin.serialization', version: '1.4.30']
> Plugin request for plugin already on the classpath must not include a version
it works if I remove the version, but then fails when I do the iOS framework build. The serialzation github page shows to include the version. What is the issue here?william
02/27/2021, 4:41 PM// ignore these warnings
kotlin.target.compilations.all {
allKotlinSourceSets.forEach { sourceSet ->
sourceSet.languageSettings.apply {
useExperimentalAnnotation("kotlinx.coroutines.FlowPreview")
useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi")
useExperimentalAnnotation("io.ktor.util.KtorExperimentalAPI")
}
}
}
Aslam Hossin
03/03/2021, 12:12 PM_What should_ we do _about the current android project?_
UPDATE: To better support the community in this migration, JFrog has extended the JCenter new package versions submission deadline through March 31st 2021.
To clarify, the JCenter repository will keep serving packages for 12 months until February 1st 2022. Only the JCenter REST API and UI will be sunsetted on May 1st 2021.HaiTrvn Lưu Trữ
03/04/2021, 10:08 AMdependencies {
implementation(project(":shared"))
...
}
and i got this error message:
Failed to resolve: project::shared
Affected Modules: KMMM.backend
sorry my english is bad
my Repository https://github.com/haitrvnvn/KMMMJeremy
03/04/2021, 6:15 PMMore than one file was found with OS independent path 'META-INF/AL2.0'.
Added exclude to the packagingOptions in android{} but still getting err. This is occurring only for instrumented tests. Any ideas?leandro
03/05/2021, 3:33 PMallprojects {
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile).configureEach { task ->
task.kotlinOptions {
}
}
}
but this errors with
Execution failed for task ':mymodule:runCommonizer'.
> Could not create task ':mymodule:compileKotlinIosArm64'.
> Cannot query the value of task ':mymodule:compileKotlinIosArm64' property 'compilation' because it has no value available.
note mymodule
has the multiplatform
plugin appliedMarcello Galhardo
03/07/2021, 12:34 AMdarkmoon_uk
03/07/2021, 12:41 AMkotlinx.serialization
as part of their Gradle build process? I'vde added the Kotlin Serialization plugin but still classes I've marked @Serializable
in the script aren't being recognised as such; yielding kotlinx.serialization.SerializationException: Serializer for class 'MyClassName' is not found.
at the point of use. Any tips?Victor Cardona
03/08/2021, 2:15 PMCould not determine the dependencies of task ':compileKotlin'.
> Could not resolve all files for configuration ':kotlinCompilerClasspath'.
> Cannot resolve external dependency org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.10 because no repositories are defined.
Required by:
project :
Here is how I’m trying to load the plugin locally:
buildscript {
repositories {
flatDir { dirs("plugins") }
}
dependencies {
classpath(":kotlin-gradle-plugin:1.4.10")
classpath(":kotlin-gradle-plugin-api:1.4.10")
classpath(":kotlin-gradle-plugin-model:1.4.10")
classpath(":kotlin-compiler-embeddable:1.4.10")
classpath(":kotlin-compiler-runner:1.4.10")
classpath(":kotlin-daemon-embeddable:1.4.10")
classpath(":kotlin-daemon-client:1.4.10")
...
}
}
apply(plugin = "org.jetbrains.kotlin.jvm")
Can anyone suggest how I can do what I’m attempting? Thanks in advance.Fleshgrinder
03/08/2021, 5:54 PMincludeBuild
where I have kotlin { explicitApi() }
in the build.gradle.kts
file. The problem is that IntelliJ completely ignores this setting and every time I have public something
IntelliJ complains that this is superfluous.Christoph Hock
03/08/2021, 7:46 PMLauren Yew
03/09/2021, 10:24 PMcom.android.tools.build:gradle
to 7.0.0-alpha09
to get Jetpack compose running. Now when I run publishToMavenLocal
, I get the error
* What went wrong:
Execution failed for task ':<library>:generatePomFileForLibraryAarPublication'.
> Could not apply withXml() to generated POM
> Configuration with name 'compile' not found.
Has anyone else run into this issue?Lauren Yew
03/09/2021, 10:26 PMno
03/10/2021, 8:40 AMholgerbrandl
03/10/2021, 5:22 PMandrewreitz
03/13/2021, 6:58 PMChristoph Hock
03/16/2021, 12:14 AMgradle installDist -t
for the server module in an extra task. Serverreloads work greate with this solution but I can't get the client js part to work propally. For the client part I added the following code to my build.gradle.kts inside my server module
tasks.withType<Copy>().named("processResources") {
dependsOn(":client:browserDistribution")
from(project(":client").tasks.named("browserDistribution"))
}
The first time I make changes to the client module while gradle installDist -t
is running the changes get compiled and copied over to the servermodule, but any changes after that don't get copied over, even thougth the build is reran. Am I doing something wrong? Any advice on how to fix this?bjonnh
03/16/2021, 2:11 PMCarter
03/16/2021, 8:21 PMcom.github.johnrengelman.shadow
I’m trying to create a fat JAR from various kotlin modules and my attempts to exclude transitive dependencies don’t seem to be working. My output JAR is truly fat at 820mb.
I’ve tried doing this, which is what I think I need:
dependencies {
implementation(project(":brainLib")) {
transitive = false
}
}
But I get the error:
Could not determine the dependencies of task ':brainLib:compileKotlinJvm'.
> Could not resolve all dependencies for configuration ':brainLib:jvmCompileClasspath'.
> Cannot change dependencies of dependency configuration ':brainLib:commonMainApi' after it has been included in dependency resolution.
I also tried this, which is supposed to be like a “keep” rule in proguard, but that didn’t work either. (I think because the huge dependencies are transitive under brainLib).
shadowJar {
minimize {
exclude(project(":brainLib"))
}
}
Are there other suggestions as to what I could try?eygraber
03/17/2021, 4:38 AMjCenter
below all of my other repositories. The only thing that gets logged is:
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/6.8.3/userguide/command_line_interface.html#sec:command_line_warnings>
BUILD SUCCESSFUL in 2m 33s
I'm using Groovy gradle, and don't have a buildSrc directory. My project uses Kotlin 1.4.31.
Anyone know what's up with that?PHondogo
03/17/2021, 11:13 PMPaul Woitaschek
03/18/2021, 6:01 AMbitkid
03/18/2021, 10:20 AMrobfletcher
03/18/2021, 2:49 PMjava.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel
trying to run a Gradle build with Kotlin scripts under buildSrc
using the new Zulu JDK 16?scirner
03/18/2021, 10:26 PMgrpc 1.17
. I depend on another library that uses implementation grpc 1.32
. So on the runtime classpath it correctly resolves to | | +--- io.grpc:grpc-netty:1.17.1 -> 1.32.2 (*)
. The problem is when you actually run the application you get a noclassdef found error for something that exists in 1.32
. A hack to fix this is for the app to depend on 1.32
itself but I'm trying to understand why this is a problem. The runtime classpath is resolving how I expect it to. Are the compile classpath versions strictly preferred or something?Jonathan Olsson
03/19/2021, 11:15 AM# root/build.gradle:
buildscript {
repositories {
maven {
url "$url"
credentials { ... }
}
}
dependencies {
classpath "my.org.foo:my-plugin:$version"
}
}
And then I could simply:
apply plugin: 'my.org.foo'
Now I try to replace this by what appears to be the "modern" approach:
# root/settings.gradle
pluginManagement {
repositories {
maven {
url "$url"
credentials { ... }
}
}
}
# root/subModule/build.gradle
plugins {
id 'my.org.foo' version '...'
}
Now, when doing this gradle tries to resolve this to 'my.org.foo:my.org.foo.gradle.plugin:$version'
.
How do I make gradle understand how to locate the proper artifact? Thanks!Jonathan Olsson
03/19/2021, 11:15 AM# root/build.gradle:
buildscript {
repositories {
maven {
url "$url"
credentials { ... }
}
}
dependencies {
classpath "my.org.foo:my-plugin:$version"
}
}
And then I could simply:
apply plugin: 'my.org.foo'
Now I try to replace this by what appears to be the "modern" approach:
# root/settings.gradle
pluginManagement {
repositories {
maven {
url "$url"
credentials { ... }
}
}
}
# root/subModule/build.gradle
plugins {
id 'my.org.foo' version '...'
}
Now, when doing this gradle tries to resolve this to 'my.org.foo:my.org.foo.gradle.plugin:$version'
.
How do I make gradle understand how to locate the proper artifact? Thanks!tapchicoma
03/19/2021, 11:29 AMpluginManagment
in settings.gradle.kts
, for example for android plugin:
pluginManagement {
repositories {
gradlePluginPortal()
google()
}
resolutionStrategy {
eachPlugin {
when (requested.id.id) {
"com.android.application" ->
useModule("com.android.tools.build:gradle:${requested.version}")
}
}
}
}
Jonathan Olsson
03/19/2021, 11:39 AMtapchicoma
03/19/2021, 11:45 AMbuildSrc/build.gradle.kts
old way 🤷♂️Vampire
03/19/2021, 3:03 PMplugins
block would be unnecessary clutter as you then need to specify it on every usage instead of one time centrally.
The marker artifacts are the default way how a plugin id is translated to the actual dependency. Imagine you have an artifact my-plugins.jar
that contains the plugins my-a
, my-b
and my-c
.
Then you will have three "marker artifacts" that follow the naming convention you have seen and then depend on the my-plugins.jar
.Jonathan Olsson
03/19/2021, 9:04 PM