andylamax
07/07/2022, 1:30 PMGrégory Lureau
07/08/2022, 9:51 AMplugins {
id("com.deezer.kmp.convention-plugin") version "0.1.0"
}
kmpp {
platformJvm.set(true)
}
but I've a couple of issues:
• when I use a Property (from an abstract Extension), the value is accessible only if I use afterEvaluate
• (I think) the multiplatform plugin expects to be configured in the configuration pass , and what I do in the afterEvaluate is too late
Is it possible to listen Property changes so that I can apply multiplatform plugin when the value is set? (I suppose it's still the configuration phase)
Any help or idea is much appreciated.eygraber
07/12/2022, 7:02 PMjs
target to my KMP build, I get the following error:
Build was configured to prefer settings repositories over project repositories
because I have:
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
in my settings.gradle.kts
.
I remember this being reported somewhere (Gradle issues, youtrack, etc...), but I can't find it now. Anyone know where it is?eygraber
07/12/2022, 9:01 PMassembleXCFramework
task without having to map the outputFile
in a separate copy task?Ricardo C.
07/13/2022, 1:43 PMJavier
07/13/2022, 3:31 PMkotlin-test
, should it get the same version than the KGP version in the classpath? Or the version can depends on other libraries adding kotlin-test
with a higher/lower version?mkrussel
07/13/2022, 4:21 PMbuildSrc
project to configure. It's breaking on applying the kotlin-dsl
plugin.
An exception occurred applying plugin request [id: 'org.gradle.kotlin.kotlin-dsl', version: '2.3.3']
> Failed to apply plugin class 'org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper'.
> Could not create an instance of type org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension.
> Companion
Gradle version: 7.3.3
Kotlin version: 1.7.0
kotlin-dsl version: 2.2 and 2.3.3Ky
07/15/2022, 4:53 PMJeff Lockhart
07/20/2022, 12:23 AMgenerateDefCocoaPodsLib
when it's executed from the iosX64Test
task:
iosX64Test
+--- ...
+--- generateDefCocoaPodsLib
| +--- ...
+--- ...
But I don't want to modify this task, or append the additional definitions when it's executed from any other task tree:
assemble
+--- ...
| +--- generateDefCocoaPodsLib
| | +--- ...
| +--- ...
+--- ...
sreich
07/21/2022, 4:08 PMsreich
07/21/2022, 4:10 PMulrikguenther
07/22/2022, 10:14 AMsreich
07/22/2022, 3:27 PMOla Adolfsson
07/24/2022, 8:30 AMdef file = new File(path)
def data = new JsonSlurper().parse(file)
data.types = "my new value"
def json = JsonOutput.prettyPrint(JsonOutput.toJson(data))
Slackbot
07/25/2022, 5:10 PMEmirhan Emmez
07/26/2022, 7:09 AMGuilherme Delgado
07/27/2022, 10:03 PM[versions]
some = "123"
[libraries]
my-lib = { group = "com.mycompany", name="mylib", version.ref="some" }
+
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
versus:
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
library("my-lib", "com.mycompany", "mylib").versionRef("123")
}
}
}
Personally I prefer separating in a .toml file and the “simpler” syntax, but other than that I couldn’t figure it out by reading this doc. Thanks!Slackbot
07/28/2022, 12:06 PMmikehearn
07/28/2022, 1:52 PMUnable to find a variant of org.jetbrains.kotlin:kotlin-test:1.6.10
? This just started now so I'm wondering if someone accidentally yanked an artifact from some repository. Not sure what the best channel to ask about this is.charleskorn
07/25/2022, 6:46 AMCould not determine the dependencies of task ':kotest-framework:kotest-framework-multiplatform-plugin-gradle:test'.
> Could not resolve all task dependencies for configuration ':kotest-framework:kotest-framework-multiplatform-plugin-gradle:testRuntimeClasspath'.
> Could not resolve project :kotest-assertions:kotest-assertions-core.
Required by:
project :kotest-framework:kotest-framework-multiplatform-plugin-gradle
> The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm'. However we cannot choose between the following variants of project :kotest-assertions:kotest-assertions-core:
- jvmRuntimeElements
- runtimeElements
(full error in thread)Tianyu Zhu
08/01/2022, 11:23 PMMETA-INF/*.kotlin_module
files together?
2. If so, is there a gradle plugin that will help me with that?
3. Otherwise, why doesn't IntelliJ understand kotlin code that's been put into fat jars?andylamax
08/08/2022, 2:06 AMBrandon Martin
08/08/2022, 9:13 PM./gradlew build -x test
I don't see a build/qaurkus-app
folder at all.Adam S
08/09/2022, 5:53 PMkotlin.jvmToolchain.languageVersion.set(JavaLanguageVersion.of(17))
.
It's a bit frustrating because in CI/CD it tests using JDK 11/17/18 - but they all pass because Gradle sets the tests to use the same as the main code - JDK 11.
But I would like to automate this, so I don't have to manually set the version for test code.
How can I set the Java language level to 11/17/18 based on a Gradle property for compile test code in src/jvmTest
?
I'm using Kotlin Multiplatform 1.7.10, Gradle 7.5.1.eygraber
08/09/2022, 7:18 PMlanguageSettings.optIn
?hfhbd
08/10/2022, 4:54 AMplugins {
`kotlin-dsl`
kotlin("plugin.serialization") version "1.7.0"
}
repositories {
gradlePluginPortal()
mavenCentral()
}
Jakob K
08/13/2022, 10:38 PM-Xcontext-receivers
?
I know that it leads to the project being compiled as a pre-release binary, but is it really not possible to use that libraries pre-release binary in another project (which will also be compiled to a pre-release binary then)?darkmoon_uk
08/15/2022, 3:29 AMplugins
block, but it seems like Gradles API is juuuust about designed to make this impossible!? Is there some way that I'm missing?
• A function to choose a string key for the version can be made available from buildSrc
✅
• The type-unsafe accessors needed to select a version by key, cannot be accessed from within plugins {}
because a handle on project
is not available. :
• libs
can be accessed through (apparently) some Gradle 'black magic' but, libs
does not re-expose the type-unsafe accessor either from the generated LibrariesForLibs
type or its AbstractExternalDependencyFactory
supertype.dvdandroid
08/15/2022, 7:16 AM@Suppress("DSL_SCOPE_VIOLATION")
(issue KTIJ-19369), but after sync project it errors with:
Line 1: @Suppress("DSL_SCOPE_VIOLATION")
^ Expecting an expression
ScriptCompilationException(errors=[ScriptCompilationError(message=Expecting an expression, location=C:\Users\me\.gradle\.tmp\gradle-kotlin-dsl-2485107686268774832.tmp\build.gradle.kts (1:33))])
how to fix this issue? cannot always reproducedvdandroid
08/15/2022, 9:50 AMprojects
accessors (from precompiled scripts/plugins) instead of libs
like: https://github.com/gradle/gradle/issues/15383#issuecomment-779893192 ?
i tried implementation(files(projects.javaClass.superclass.protectionDomain.codeSource.location))
but it does not take the rootProject
org.gradle.accessors.dm.RootProjectAccessor
(obviously)dvdandroid
08/15/2022, 9:50 AMprojects
accessors (from precompiled scripts/plugins) instead of libs
like: https://github.com/gradle/gradle/issues/15383#issuecomment-779893192 ?
i tried implementation(files(projects.javaClass.superclass.protectionDomain.codeSource.location))
but it does not take the rootProject
org.gradle.accessors.dm.RootProjectAccessor
(obviously)Vampire
08/19/2022, 9:35 AM