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 AMtapchicoma
09/27/2022, 8:35 AM<system_tmp>/kotlin-daemon.*.log
and probably also Gradle daemon logs here: <gradle_user_home>/daemon/<build_gradle_version>/*.log
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 :module123:compileDebugKotlin
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 AMSergey Chelombitko
10/13/2022, 11:01 AMtapchicoma
10/13/2022, 11:03 AMSergey Chelombitko
10/13/2022, 11:06 AMtapchicoma
10/13/2022, 11:07 AMSergey Chelombitko
10/13/2022, 11:31 AMAlexander.Likhachev
10/13/2022, 12:26 PMSergey Chelombitko
10/13/2022, 3:34 PMTime metrics:
Total Gradle task time: 94.63 s
Task action: 18.65 s
Backup output: 9.96 s
Connect to Kotlin daemon: 3.78 s
Clear jar cache: 0.11 s
Calculate output size: 0.52 s
Run compilation: 6.91 s
Incremental compilation in daemon: 1.79 s
Store build info: 0.07 s
Calculate initial dirty sources set: 0.83 s
Analyze dependency changes: 0.61 s
Find history files: 0.06 s
Analyze history files: 0.02 s
Analyze Java file changes: 0.00 s
Analyze Android layouts: 0.00 s
Detect removed classes: 0.01 s
Update caches: 0.00 s
Sources compilation round: 0.14 s
Write history file: 0.08 s
Compiler initialization time: 0.02 s
Compiler code analysis: 0.10 s
Compiler code generation: 0.01 s
Size metrics:
Total size of the cache directory: 254.8 MB
ABI snapshot size: 33.3 KB
Total compiler iteration: 1
1.7.20 + new IC:
Time metrics:
Total Gradle task time: 126.89 s
Task action: 20.82 s
Backup output: 10.53 s
Connect to Kotlin daemon: 4.00 s
Clear jar cache: 0.15 s
Calculate output size: 0.46 s
Run compilation: 16.67 s
Incremental compilation in daemon: 10.76 s
Store build info: 0.12 s
Calculate initial dirty sources set: 8.24 s
Compute classpath changes: 8.21 s
Load current classpath snapshot: 0.94 s
Remove duplicate classes: 0.87 s
Shrink current classpath snapshot: 6.29 s
Get lookup symbols: 0.51 s
Find referenced classes: 2.11 s
Find transitively referenced classes: 3.66 s
Load shrunk previous classpath snapshot: 0.69 s
Compute changed and impacted set: 0.29 s
Compute class changes: 0.25 s
Compute Kotlin class changes: 0.24 s
Compute Java class changes: 0.00 s
Compute impacted set: 0.02 s
Analyze Java file changes: 0.00 s
Analyze Android layouts: 0.00 s
Detect removed classes: 0.01 s
Update caches: 0.02 s
Sources compilation round: 0.62 s
Write history file: 0.08 s
Shrink and save current classpath snapshot after compilation: 0.90 s
Save shrunk current classpath snapshot: 0.74 s
Compiler initialization time: 0.21 s
Compiler code analysis: 0.36 s
Compiler code generation: 0.03 s
Classpath entry snapshot transform: 0.02 s
Load classes: 0.00 s
Snapshot classes: 0.02 s
Read basic information about classes: 0.00 s
Find inaccessible classes: 0.00 s
Snapshot Kotlin classes: 0.01 s
Snapshot Java classes: 0.00 s
Save classpath entry snapshot: 0.00 s
Size metrics:
Total size of the cache directory: 331.0 MB
ABI snapshot size: 33.3 KB
Total compiler iteration: 3
Number of times 'ClasspathEntrySnapshotTransform' ran: 1
Size of jar classpath entry: 1.7 MB
Size of jar classpath entry's snapshot: 539.7 KB
Number of times classpath changes are computed: 335
Number of times classpath snapshot is shrunk and saved after compilation: 336
Number of classpath entries: 28089
Size of classpath snapshot: 4.8 GB
Size of shrunk classpath snapshot: 202.4 MB
Number of times classpath snapshot is loaded: 335
Number of cache hits when loading classpath entry snapshots: 28027
Number of cache misses when loading classpath entry snapshots: 1
Time metrics:
Total Gradle task time: 134.97 s
Task action: 21.14 s
Backup output: 10.77 s
Connect to Kotlin daemon: 4.47 s
Clear jar cache: 0.12 s
Calculate output size: 0.44 s
Run compilation: 6.73 s
Incremental compilation in daemon: 1.62 s
Store build info: 0.09 s
Calculate initial dirty sources set: 0.76 s
Analyze dependency changes: 0.57 s
Find history files: 0.06 s
Analyze history files: 0.02 s
Analyze Java file changes: 0.00 s
Analyze Android layouts: 0.00 s
Detect removed classes: 0.01 s
Update caches: 0.00 s
Sources compilation round: 0.13 s
Write history file: 0.08 s
Compiler initialization time: 0.02 s
Compiler code analysis: 0.08 s
Compiler code generation: 0.02 s
Size metrics:
Total size of the cache directory: 255.1 MB
ABI snapshot size: 27.6 KB
Total compiler iteration: 1
tapchicoma
10/13/2022, 3:44 PMSergey Chelombitko
10/13/2022, 3:44 PMAndrey Uskov [JB]
10/13/2022, 6:58 PM