Anton Afanasev
12/09/2021, 8:12 PMdependency
task that prints all the dependencies, but I am not able to assemble that pieces to a working solution.
tasks.register("checkForAndroidxDependencies") {
description = "verify that no androidx dependencies are present"
group = "verification"
dependsOn("androidDependencies") // how do I get the output of the androidDependencies?
doLast {
exec {
commandLine = listOf("grep", "androidDependencies") // Are there any way to execute the "grep" on the androidDependencies?
}
}
}
Any help will be much appreciated.Gabriel Duncan
12/09/2021, 11:25 PMgradle.properties
files between modules. For example if I have
project/
module1/
gradle.properties
module2/
gradle.properties
...etc
and in module2
i want to be able to pull a property from module1
like say appVersion
is there a way to do this? or is that just a bad idea?Anton Afanasev
12/13/2021, 3:00 PMshould throw
printed in build logs, but for some reason it is BUILD SUCCESSFUL
project.configurations.all {
resolutionStrategy.eachDependency {
if (this.requested.name.contains("abc")) {
println("should throw")
throw IllegalArgumentException("Can not use abc dependency ")
}
}
}
tapchicoma
12/14/2021, 2:31 PMorg.gradle.jvmargs=-Dkotlin.daemon.jvm.options=...
plus using Kotlin DSL - it may happen spawned Kotlin daemon will ignore them. This is happening when Kotlin DSL scripts are compiling and this workaround is set by Gradle. Either update Gradle version or use kotlin.daemon.jvmargs
property.Paul Woitaschek
12/14/2021, 3:54 PMrocketraman
12/14/2021, 8:17 PMcompileClasspath
configuration or main
source set. However, if I include the second build in the first build, now I get a compileClasspath
configuration coming from a main
source set (and this breaks the jetbrains compose runtime dependency). Any ideas on where to look?Javier
12/15/2021, 2:49 PMimplementation
instead of api
to avoid exposing Material, but it is becoming inviable the amount of dupe code of things are not going to change in the foreseeable future (animations for example). So I moved my components to be a mix of my custom theme params plus material params. Problem is I don't want expose some composables/imports from Material lib, so they can't be imported and not only fix the issue of IDE suggesting them, even just failing in compile time too.
Is it possible to be done with Gradle easily?Peter
12/15/2021, 9:29 PMPatrick Ramsey
12/15/2021, 10:46 PMursus
12/16/2021, 3:45 PMPeter
12/16/2021, 3:50 PMReason: Task ':generateMetadataFileForPluginMavenPublication' uses this output of task ':publishPluginJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
?ursus
12/16/2021, 5:15 PMGabriel Duncan
12/16/2021, 10:06 PMsetEnvironment
method, however i want it to be available for all of my jsBrowser..
type tasks.
so in summary i want to:
1. get a value from the properties file ✅ — this is easy
2. set that as an env variable from the gradle.build.kts file so that its available to all tasks
any help will be greatly appreciated!ursus
12/18/2021, 2:25 PMjannis
12/21/2021, 3:57 PMA
. But sometimes I want to run a defined set of Tests B
but not run the Tests from A
. I tried utilizing @LargeTest
etc and Test suites, but it didn't seem to work out nicely 💭 I'd love to not touch Tests A
in any way.
Note: All tests are within one gradle moduleK Merle
12/21/2021, 6:38 PMdarkmoon_uk
12/23/2021, 5:38 AMbuildSrc
?
I'm hitting unexpected trouble quite early on 🧵 👉Chrimaeon
12/24/2021, 11:40 AMbuild.gradle.kts
that are experimental and require a RequiresOptIn
annotation like @ExperimentalPathApi
. I'm using those in the build script with the @OptIn
annotation. Problem/Issue now is a warning in the build script that I did not add the RequiresOptIn
to the kotlin compiler options - but where do I add this compiler option for the Gradle script Kotlin compiler?
An example of the issue can be seen here: https://github.com/chrimaeon/curriculumvitae/blob/03663b8ee32f3f83746536f7ac093df5a93a5953/app/build.gradle.kts#L40mbonnin
12/26/2021, 3:13 PMkotlin.mpp.stability.nowarn
, kotlin.native.binary.memoryModel
or kotlin.stdlib.default.dependency
? I'd love these to be moved to setters/getters APIs in the "kotlin" extension instead:
1. that'd allow proper API lifecycle management (preview, stable, deprecated) and avoid cluttering the gradle.properties
file with properties that are not supported any more
2. that can be more precise about when the property is needed. I understand something like kotlin.native.binary.memoryModel
is only for binaries so adding it only in binaries {}
makes this explicit compared to a global gradle.properties
prop
3. Maybe it'll play better with Gradle configuration cache?tseisel
12/30/2021, 9:49 AMkotlinOptions
and kapt
for each of those modules without repeating myself, how can I centralize configuration ? I've found very few official resources on Kotlin project modularization.dave08
12/30/2021, 12:56 PM:common
some-android-lib
depends on :common
and android-app
depends on some-android-lib
, I want to only publish some-android-lib
to maven and include :common
in it, and then only refer to some-android-lib
in android-app
...Jast Lai
12/30/2021, 8:58 PMKy
12/31/2021, 3:56 AMFrancesc
01/02/2022, 6:33 PMapply from: "$rootDir/base_library_module.gradle"
- is there something equivalent with Kotlin DSL for build.gradle.kts
?Joffrey
01/03/2022, 4:48 PMmaxParallelForks
for KotlinNativeTest
tasks in Gradle? I'm trying to prevent native macOS tests from running in parallel, but I can't seem to find the correct config.
Note that my diagnosis might be wrong, but I'm getting an error that I used to get because of parallelism (my tests access an external resource that doesn't support parallelism).
(this used to be posted in #kotlin-native but got no answer in a few days, so I guess this channel might be more appropriate)Peter
01/05/2022, 5:22 PMTomasz Krakowiak
01/09/2022, 9:08 PMtasks.create<JavaExec>("run") {
classpath = //?
mainClass.set("com.example.MainKt")
}
sourceSets
container is at this point empty. configurations
container does not have jvmMainRuntime
configuration.Tomasz Krakowiak
01/10/2022, 2:29 PMkotlin.jvm().compilations["main"].defaultSourceSet.resources.compiledBy(someCopyTask){
val directoryProperty = project.objects.directoryProperty()
directoryProperty.set(someCopyTaskOutputDir)
directoryProperty
}
Utkarsh Tiwari
01/11/2022, 12:38 PMcore_ds_component
of an Android project to artifactory. When I run the publish command, I get this error.
I couldn’t find dokka in the dependency graph of this module. Does anyone has any idea what could be wrong?pabl0rg
01/12/2022, 9:05 PMPlugin [id: 'org.jetbrains.kotlin.jvm', version: '1.6.0'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.0')
Searched in the following repositories:
MavenRepo
BintrayJCenter
BintrayJCenter2
maven(<https://plugins.gradle.org/m2/>)
maven2(<https://oss.sonatype.org/content/repositories/snapshots/>)
maven3(<https://www.jetbrains.com/intellij-repository/releases/>)
maven4(<https://jetbrains.bintray.com/intellij-third-party-dependencies>)
pabl0rg
01/12/2022, 9:05 PMPlugin [id: 'org.jetbrains.kotlin.jvm', version: '1.6.0'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.0')
Searched in the following repositories:
MavenRepo
BintrayJCenter
BintrayJCenter2
maven(<https://plugins.gradle.org/m2/>)
maven2(<https://oss.sonatype.org/content/repositories/snapshots/>)
maven3(<https://www.jetbrains.com/intellij-repository/releases/>)
maven4(<https://jetbrains.bintray.com/intellij-third-party-dependencies>)
ephemient
01/12/2022, 9:06 PMColton Idle
01/12/2022, 9:08 PMpabl0rg
01/12/2022, 9:34 PMKedar
01/13/2022, 3:20 AM