dave08
02/08/2022, 1:55 PMrefreshVersions
task on the main project still updates the versions.properties
in mylib instead of the one in the setting.gradle.kts's path in the main project... is there any workaround?dave08
02/08/2022, 1:57 PM// settings.gradle.kts in the MAIN project, not the one in mylib...
refreshVersions {
enableBuildSrcLibs()
versionsPropertiesFile = File("./versions.properties")
}
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
include(":app")
includeBuild("../mylib")
Nikky
02/09/2022, 2:54 PM.absoluteFile
maybe ?Nikky
02/09/2022, 2:54 PMdave08
02/09/2022, 2:55 PMNikky
02/09/2022, 3:07 PMdave08
02/09/2022, 4:06 PMcom/android/build/api/extension/AndroidComponentsExtension
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
...
it could be it's now looking at the other versions.properties file and starting to find problems with deps...louiscad
02/09/2022, 4:07 PMdave08
02/09/2022, 4:09 PMabsoluteFile
, once I switched, this error appeared...louiscad
02/09/2022, 4:10 PMlouiscad
02/09/2022, 4:10 PMdave08
02/09/2022, 4:11 PMdave08
02/09/2022, 4:11 PMlouiscad
02/09/2022, 4:11 PMdave08
02/09/2022, 4:12 PMlouiscad
02/09/2022, 4:12 PMlouiscad
02/09/2022, 4:12 PMdave08
02/09/2022, 4:12 PMlouiscad
02/09/2022, 4:14 PMdave08
02/09/2022, 4:32 PMclasspath(AndroidX.navigation.safeArgsGradlePlugin.withVersion("2.5.0-alpha01"))
seems to work, but versions.properties still from project B... even WITH absoluteFile...louiscad
02/09/2022, 4:33 PMdave08
02/09/2022, 4:33 PMplugin.{...}
for safeArgs in either... I needed to add the withVersion for it to work.dave08
02/09/2022, 4:35 PMdave08
02/09/2022, 4:35 PMlouiscad
02/09/2022, 4:35 PMCan you print the asbolute path in the Gradle script, to ensure it's the path you are expecting?
dave08
02/09/2022, 4:37 PMlouiscad
02/09/2022, 4:39 PMlouiscad
02/09/2022, 4:40 PMlouiscad
02/09/2022, 4:41 PMFile(…)
from <http://java.io|java.io>
instead of file(…)
from Gradle which will be a relative link (granted you don't put ./
at the beginning of your path.louiscad
02/09/2022, 4:42 PMrootDir.parent!!
, then .resolve(…)
dave08
02/09/2022, 4:44 PMversionsPropertiesFile = rootProject.projectDir.absoluteFile.resolve("versions.properties")
which seems to print the right path... but I get:
* What went wrong:
Execution failed for task ':refreshVersions'.
Can't get latest most stable version in an empty list
louiscad
02/09/2022, 4:45 PMdave08
02/09/2022, 4:45 PMlouiscad
02/09/2022, 4:45 PMdave08
02/09/2022, 4:46 PMAre the repositories properly declared in both projects?each project has their own deps. It was working with project B's versions.properties before I changed the path... locating the versions.properties?
louiscad
02/09/2022, 4:49 PMversions.properties
file or what's provided, and if it finds the version when Gradle decides it's time to look at the dependencies of a project, fine, otherwise, it'll block that Gradle callback while it tries to find the latest most stable version. If it can't find the right version, e.g. because no correct repositories has been defined, or because none have the declared artifact, it fails.louiscad
02/09/2022, 4:51 PMdave08
02/09/2022, 4:51 PMid("de.fayard.refreshVersions") version "0.40.1"
dave08
02/09/2022, 4:51 PMlouiscad
02/09/2022, 4:52 PMdave08
02/09/2022, 4:52 PMlouiscad
02/09/2022, 4:53 PMlouiscad
02/09/2022, 4:53 PMrepositories {
... // <-- what you have here
}
louiscad
02/09/2022, 4:53 PMdependencyResolutionManagement
block in settings.gradle[.kts]
dave08
02/09/2022, 4:55 PMlouiscad
02/09/2022, 4:55 PMdave08
02/09/2022, 4:56 PMdave08
02/09/2022, 4:56 PMlouiscad
02/09/2022, 4:57 PMNikky
02/09/2022, 8:47 PMincludeBuild
that i know of is .. not supported
i tried to implement that myself a while back but.. gradle is weirdNikky
02/09/2022, 8:48 PMlouiscad
02/09/2022, 8:48 PMbut.. gradle is weirdMandatory link: https://twitter.com/Louis_CAD/status/1491500852871315458?s=20&t=Yo36TOyFbVbqzKEkQ_dODA
Nikky
02/09/2022, 8:50 PMlouiscad
02/09/2022, 9:00 PM