enighma
02/22/2024, 12:46 AMreactormonk
02/22/2024, 4:42 PMdependencyResolutionManagement {
// repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "<https://jitpack.io>" }
// TODO replace by includeBuild <https://stackoverflow.com/questions/72543519/gradle-sync-failed-when-upgrade-to-7-3-3-and-agp-7-2-0-cannot-initiate-v1-model>
mavenLocal {
content {
includeGroup("no.entur.android.nfc")
includeGroup("net.folivo")
}
}
}
}
And this code:
implementation("net.folivo:trixnity-client:4.2.6-LOCAL")
and
~/.m2/repository/net/folivo/trixnity-client $ cat maven-metadata-local.xml
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>net.folivo</groupId>
<artifactId>trixnity-client</artifactId>
<versioning>
<latest>4.2.6-LOCAL</latest>
<release>4.2.6-LOCAL</release>
<versions>
<version>4.2.6-LOCAL</version>
</versions>
<lastUpdated>20240222160142</lastUpdated>
</versioning>
</metadata>
But I get
Failed to resolve: net.folivo:trixnity-client:4.2.6-LOCAL
Paul Meshkovsky
02/22/2024, 7:12 PMSlackbot
02/25/2024, 3:26 PMursus
02/25/2024, 3:26 PMritesh
02/26/2024, 12:24 AMOleg Nenashev
02/26/2024, 10:36 AM#declarative-gradle
- on the Gradle Community Slack
• Category on Discourse - on Gradle Forums
In the coming weeks/months, we will share much more about the project and its progress. You are welcome to join the channels and the discussions there!Giovanny Velez
02/26/2024, 6:55 PMaar
and a Java JAR
library?
I’ve been messing with targetSources the Android and Java plugins, but no success 😞
For more detailed context, what I need is a module just with the Compose Multiplatform dependencies and my own composables. And to add it as a dependency in the compatible targets (I can’t add it to comonMain since I’m also using a Kotlin JS target which can’t manage Compose Multiplatform), so I’ll add it manually to the Android, iOS and Desktop targets.arekolek
02/27/2024, 11:09 AMRepositoryHandler.myProxy()
in settings.gradle.kts
?
fun RepositoryHandler.myProxy(repository: String, fallbackUrl: String? = null, vararg includeGroups: String) {
maven("<https://example.com/$repository/>") {
content { includeGroups.forEach(::includeGroup) }
credentials {
username = providers.gradleProperty("MY_PROXY_USERNAME").get()
password = providers.gradleProperty("MY_PROXY_PASSWORD").get()
}
}
if (fallbackUrl == null) return
maven(fallbackUrl) {
content { includeGroups.forEach(::includeGroup) }
}
}
I would like to use it like:
pluginManagement {
repositories {
gradlePluginPortal()
google()
myProxy("maven-central")
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
myProxy("jitpack-io", "<https://jitpack.io>", "com.example")
google()
myProxy("maven-central")
mavenCentral()
}
}
but I would have to repeat the definition in both pluginManagement
and dependencyResolutionManagement
is there any way to re-use the same definition in both? I don't see why that should be impossible (since it works if I just duplicate it)CLOVIS
02/27/2024, 4:47 PMjsMain
source set doesn't depend on the commonMain
source set?
I first learned of this here, but we couldn't find any documentation explaining why that is.ursus
03/03/2024, 3:01 AMagp
to 8.3.0
after a release build I see baseline profiles generated at `build/outputs/apk/release/flavor/baselineProfiles`with 2 .dm
files
Uhm.. why? Didn't it use to need to launch some emulator tests etc?
Or is this not new?Patrik Aradi
03/04/2024, 1:54 AMCsászár Ákos
03/07/2024, 1:30 PMAlexander Zhirkevich
03/10/2024, 10:16 PM./gradlew B:assebmle --continue --dependency-verification off
fails with unresolved dependency error. Why Gradle tries to resolve dependency for the module that is not required for the requested task? Can i disable it in any other way than excluding A from the project?CLOVIS
03/11/2024, 7:32 PMkotlinExtension.sourceSets.named { it == "jsMain" }.configureEach {
println("The JS source set exists")
}
then the build fails with
> Configure project :core
e: Please initialize at least one Kotlin target in 'core (:core)'.
Read more <https://kotl.in/set-up-targets>
w: The following Kotlin source sets were configured but not added to any Kotlin compilation:
* commonMain
* commonTest
where :core
is just:
plugins {
kotlin("multiplatform")
id("my.plugin.here")
id("maven-publish")
}
kotlin {
jvm()
js(IR) {
browser()
}
}
My understanding is that .named { … }.configureEach { … }
is lazy and thus shouldn't impact the build configuration at all, and certainly not which platforms are declared.
I also tried
kotlinExtension.sourceSets.configureEach {
if (it.name != "jsMain") return@configureEach
println("The JS source set exists")
}
to the same result.Albert Chang
03/13/2024, 2:57 AMkotlin-dsl
plugin to the module. When I try to use Enum.entries
in the module, I get two errors:
• The feature "enum entries" is only available since language version 1.9
• This declaration needs opt-in. Its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'
Even if I add @OptIn(kotlin.ExperimentalStdlibApi::class)
, the first error still persists.
But if I use embedded-kotlin
instead of kotlin-dsl
, the errors go away. Any reasons why?
I'm using Gradle 8.6 and the bundled Kotlin version is 1.9.20.Joel Denke
03/13/2024, 7:11 AMeygraber
03/13/2024, 5:49 PMapplyDefaultHierarchyTemplate
?eygraber
03/15/2024, 3:53 AMallTests
should it be running android unit tests?Jon Bailey
03/15/2024, 1:02 PMAndroid75
03/16/2024, 6:16 AMimplementation project(":data")
Arjan van Wieringen
03/16/2024, 6:16 PMplugins {
`java-gradle-plugin`
`kotlin-dsl`
}
sourceSets {
main {
kotlin {
srcDir("src/main/kotlin")
}
}
}
https://docs.gradle.org/current/userguide/custom_plugins.html#sec:custom_plugins_standalone_project
EDIT: well.... actually that just works, after removing kotlin-dsl
. I am a bit uncertain whether or not kotlin-dsl was needed. I suppose it wasnt. A plugin is 'just' another project.Raimund Klein
03/16/2024, 10:39 PMidea {
module {
downloadJavadoc = true
downloadSources = true
}
}
Hristijan
03/18/2024, 12:34 PMtjohnn
03/19/2024, 8:43 PMCould not resolve all files for configuration ':some-kmm-module:detachedConfiguration4'
.
I believe this is due to kotlin.incremental.useClasspathSnapshot
which is enabled by default from kotlin 1.8.20 (i am upgrading from kotlin 1.8.10), setting kotlin.incremental.useClasspathSnapshot
to false fixes the problem but I'd like to enable it. Here is the full error message:
> Failed to transform kotlin-stdlib-1.9.22.jar to match attributes {artifactType=classpath-entry-snapshot, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for ClasspathEntrySnapshotTransform: /home/circleci/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.22/d6c44cd08d8f3f9bece8101216dbe6553365c6e3/kotlin-stdlib-1.9.22.jar.
> java.lang.IllegalArgumentException (no error message)
> Failed to transform annotations-13.0.jar to match attributes {artifactType=classpath-entry-snapshot, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for ClasspathEntrySnapshotTransform: /home/circleci/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar.
> java.lang.IllegalArgumentException (no error message)
Pablichjenkov
03/22/2024, 8:49 PMhfhbd
03/25/2024, 10:03 AMeygraber
03/25/2024, 10:42 PMMoroa Matshubeni
03/27/2024, 8:15 AMPiotr Krzemiński
03/28/2024, 10:37 PM