nuhkoca
06/08/2022, 2:49 PMsettings.gradle.kts? I couldn’t find one(project) of what I have in root build.gradle.ktstapchicoma
06/08/2022, 3:50 PMProjectDescriptornuhkoca
06/08/2022, 4:09 PMVampire
06/08/2022, 4:10 PMtapchicoma
06/08/2022, 4:11 PMIs there any way to read a custom properties file in Settings?You could, like a normal properties file
Vampire
06/08/2022, 4:13 PMtapchicoma
06/08/2022, 4:14 PMFile versionPropertiesFile = new File(rootProject.projectDir.parentFile, "gradle/versions.properties")
def versionProperties = new Properties()
versionPropertiesFile.withInputStream {
versionProperties.load(it)
}Vampire
06/08/2022, 4:14 PMgradle.rootProject {
// do action as soon as project is available, which is after settings evaluation
}
to access the root project, but as I said, just in a delayed fashion.Vampire
06/08/2022, 4:15 PMrootProject.projectDir?
Why not settingsDir ?tapchicoma
06/08/2022, 4:15 PMsettingsDir will also workVampire
06/08/2022, 4:15 PMtapchicoma
06/08/2022, 4:15 PMProject via gradle - nice 👍Vampire
06/08/2022, 4:16 PMtapchicoma
06/08/2022, 4:16 PMbuildSrc/settings.gradle - in this case it should be rootProjectnuhkoca
06/08/2022, 4:19 PMAdam S
06/09/2022, 6:51 PM$GRADLE_HOME_DIR/gradle.properties and load them using Gradle providers
using providers.gradleProperty("artifactory_password") can be overridden using environment variables too
https://stackoverflow.com/a/72075210/4161471nuhkoca
06/10/2022, 3:02 PMgradle.properties and one line code is enough to retrieve it right?Adam S
06/10/2022, 3:43 PMnuhkoca
06/11/2022, 1:38 PM