Hylke Bron
09/22/2022, 6:18 AMimplementation(project(":module-name"))
?
This is because I am running into issues with several libraries that do not yet support Kotlin 1.7.20-RC (compose, hilt), but I need to use a feature specifically of Kotlin 1.7.20-RC (kotlin.native.binary.objcExportSuspendFunctionLaunchThreadRestriction=none
) to properly support the ios side in KMP project.Davide Giuseppe Farella
09/22/2022, 10:37 AMmain
project and a sub
project as a submodule.
Having different dependency versions caused some troubles, so we wanna align them.
sub
will have some dependencies in its toml file, but main
would need some dependencies that are not available in sub
natario1
09/22/2022, 5:35 PMit is compatible with the Gradle Build cache.Now for the stupid question - what does this mean? Is Kotlin incompatible with the build cache if one doesn’t use this flag? And what does being incompatible mean?
Adam Cooper
09/22/2022, 11:00 PMval nativeTarget = when (System.getProperty("os.name")) {
"Linux" -> linuxX64("native")
else -> throw GradleException("Host OS is not supported.")
}
nativeTarget.apply {
compilations.getByName("main") {
cinterops {
val openssl by creating {
defFile(project.file("src/cinterop/openssl.def"))
}
}
}
binaries {
executable {
// Use system C libraries
val sysRoot = "/"
val libgccRoot = File("/lib/gcc/x86_64-linux-gnu/").takeIf { it.exists() }
?: File("/lib/gcc/x86_64-pc-linux-gnu/")
// Use the most recent GCC available on the host
val libgccPath = file("${libgccRoot.absolutePath}/${libgccRoot.list()!!.last()}")
val overriddenProperties =
"targetSysRoot.linux_x64=$sysRoot;libGcc.linux_x64=$libgccPath"
val compilerArgs = "-Xoverride-konan-properties=$overriddenProperties"
this.freeCompilerArgs += listOf(compilerArgs)
this.entryPoint = "opstopus.deploptopus.main"
}
}
rrva
09/23/2022, 6:48 AMrrva
09/23/2022, 6:49 AMkotlin.code.style=official
org.gradle.parallel=true
systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false
org.gradle.caching=true
org.gradle.jvmargs=-Xshare:off -Xmx1g -XX:MaxMetaspaceSize=512m
kotlin.incremental.useClasspathSnapshot=true
nuhkoca
09/25/2022, 1:49 AMJaCoCo
report location changed in Gradle 7.5.1
? It used to be created in jacoco
in build
folder but after Gradle
upgrade, I can’t locate it.Constantin Cezar Begu
09/25/2022, 11:57 PMAbhishek Dewan
09/26/2022, 6:24 AMmattinger
09/27/2022, 12:24 AMjames
09/27/2022, 8:07 AMGradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
I’ve attached a screenshot of the resource usage up until the build dies.. and for some further context, when I look back at older jobs using Kotlin 1.6.21 I see their memory usage on the same graph peaks at around 65%. now it hits 100% and then dies. could this be a memory leak in the build phase? I’m not able to pull any useful logs either, even with enabling most kotlin.build.report.*
options 😕hfhbd
09/27/2022, 12:14 PMPluginIdExtension
anymore. With buildSrc, I could write this: plugins { latex }
, now I have to use plugins { id("latex") }
. Is this expected?
gradlePlugin {
plugins {
create("latex") {
id = "latex"
implementationClass = "latex.LatexPlugin"
}
create("plantuml") {
id = "plantuml"
implementationClass = "plantuml.PlantumlPlugin"
}
}
}
dawidhyzy
09/28/2022, 2:29 PMimplementation(name: 'some-library-release', ext: 'aar')
?
I tried implementation(name = "some-library-releasee", ext = "aar")
but got
None of the following functions can be called with the arguments supplied:
public fun <T : Dependency> DependencyHandler.implementation(dependency: TypeVariable(T), action: Action<TypeVariable(T)>): TypeVariable(T) defined in org.gradle.kotlin.dsl
public fun DependencyHandler.implementation(dependencyNotation: Any): Dependency? defined in org.gradle.kotlin.dsl
public fun DependencyHandler.implementation(group: String, name: String, version: String? = ..., configuration: String? = ..., classifier: String? = ..., ext: String? = ..., dependencyConfiguration: Action<ExternalModuleDependency>? = ...): ExternalModuleDependency defined in org.gradle.kotlin.dsl
public fun DependencyHandler.implementation(dependencyNotation: String, dependencyConfiguration: Action<ExternalModuleDependency>): ExternalModuleDependency defined in org.gradle.kotlin.dsl
public fun DependencyHandler.implementation(dependencyNotation: Provider<*>, dependencyConfiguration: Action<ExternalModuleDependency>): Unit defined in org.gradle.kotlin.dsl
public fun DependencyHandler.implementation(dependencyNotation: ProviderConvertible<*>, dependencyConfiguration: Action<ExternalModuleDependency>): Unit defined in org.gradle.kotlin.dsl
Guilherme Delgado
09/29/2022, 9:59 AM> Task module123compileDebugKotlin
warning: opt-in requirement marker kotlinx.coroutines.FlowPreview is unresolved. Please make sure it’s present in the module dependencies
warning: opt-in requirement marker kotlinx.coroutines.ExperimentalCoroutinesApi is unresolved. Please make sure it’s present in the module dependencies
warning: opt-in requirement marker kotlinx.serialization.ExperimentalSerializationApi is unresolved. Please make sure it’s present in the module dependenciesBut I’ve a gradle script with it:
private fun KotlinJvmOptions.addOptions(options: List<String> = emptyList()) {
jvmTarget = JavaVersion.VERSION_11.toString()
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.Experimental",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
) + options
}
Why is it throwing that warning? 🤔wakingrufus
09/29/2022, 10:06 PMExecution failed for task ':compileTestKotlin'.
> Error while evaluating property 'compilerOptions.jvmTarget' of task ':compileTestKotlin'.
> Failed to calculate the value of property 'jvmTarget'.
> Unknown Kotlin JVM target: 19
hfhbd
09/30/2022, 7:06 AMplugins {
kotlin("jvm") version "1.7.20"
kotlin("plugin.serialization") version "1.7.10"
id("app.cash.licensee") version "1.5.0"
}
repositories {
mavenCentral()
}
dependencies {
...
}
Mohamed Ibrahim
10/02/2022, 11:03 AMdvdandroid
10/02/2022, 1:15 PM:mainModule:submodule1:submodule2
?
now i'm using this code snippet
val libParents = mutableListOf(name)
var tempParent = parent
while (tempParent != null) {
libParents.add(tempParent!!.name)
tempParent = tempParent!!.parent
}
then i use it with joinToString()
.
if not, is it possible to optimize that code, removing the temp
,var
or even the while
loop? maybe using a kotlin fold function or something like thatrrva
10/03/2022, 9:58 AMrrva
10/03/2022, 9:58 AMVictor Kabata
10/03/2022, 10:31 AMbuild.gradle(project)- top level
subprojects {
afterEvaluate {
if (project.hasProperty('android')) {
android.buildTypes { project -> // This part
debug {...}
release{...}
... // Other build types
}
}
}
}
rrva
10/03/2022, 10:39 AMZach
10/05/2022, 5:17 PMregister("review") {
isDebuggable = false
isMinifyEnabled = false
}
But when I go to actually build the app, I get a significant amount of errors and warnings having to do with my other modules not containing the review
buildType (errors in thread). I have attempted to add the same build type to all modules with no luck, as well as trying missingDimensionStrategy
in my app module and still no change. What am I missing to add a custom build type to a multi module app?wakingrufus
10/05/2022, 9:23 PMcompile[sourceSetName]KotlinOutputClasses
property that gets added to the compile[sourceSetName]Java
task?Ji Sungbin
10/06/2022, 10:56 AMclass TestPlugin : Plugin<Project> {
override fun apply(project: Project) {
with(project) {
repositories {
maven(url = uri("<https://maven.pkg.jetbrains.space/public/p/compose/dev>"))
}
dependencies {
add(PLUGIN_CLASSPATH_CONFIGURATION_NAME, "land.sungbin:composable.reference.suppressor.plugin:1.0.0")
}
}
}
}
PHondogo
10/06/2022, 3:10 PMK Merle
10/12/2022, 10:39 AMgroostav
10/12/2022, 3:28 PMjava.lang.foreign
(an --enable-preview in java 20)
I have this very strange behaviour where intelliJ (with a gradle imported project) is able to find java.lang.foreign
, but gradle is not. I do have gradle itself running on java 17, (I Believe), and I've used `
languageVersion.set(JavaLanguageVersion.of(20))
in addition to
org.gradle.java.installations.paths=C:/Program Files/Zulu/zulu-20-ea
but gradle still seems to be compiling with javac from java-17.
Any help?Norbi
10/13/2022, 9:50 AMSergey Chelombitko
10/13/2022, 11:01 AM