jean
07/28/2020, 8:24 AMinclude ':library'
project(':library').projectDir = new File(settingsDir, '../MyLibrary/library')
I don’t find any info on how to set the project path with kotlinoctylFractal
07/28/2020, 8:26 AMinclude(":library")
project(":library").projectDir = File(settingsDir, "../MyLibrary/library")
?jean
07/28/2020, 8:26 AM.projectDir
isn’t available 😕octylFractal
07/28/2020, 8:27 AMjean
07/28/2020, 8:27 AMproject(":inorder-common").dependencyProject.projectDir = File("")
I’ll try and see if it worksoctylFractal
07/28/2020, 8:28 AMoctylFractal
07/28/2020, 8:28 AM.setProjectDir(...)
octylFractal
07/28/2020, 8:28 AMdependencyProject
? I don't see that field at alljean
07/28/2020, 8:29 AMpublic interface ProjectDependency
octylFractal
07/28/2020, 8:29 AMoctylFractal
07/28/2020, 8:29 AMsettings.gradle.kts
, right?jean
07/28/2020, 8:30 AMproject()
returns that type
fun DependencyHandler.project(
path: String,
configuration: String? = null
): ProjectDependency
jean
07/28/2020, 8:30 AMoctylFractal
07/28/2020, 8:30 AMproject
thenoctylFractal
07/28/2020, 8:30 AMSettings
object of the build scriptjean
07/28/2020, 8:37 AMproject(":inorder-common").projectDir = File("../inorder-common")
in my buildscript
block, which allows me to access the property but I get this error val cannot be reassigned
octylFractal
07/28/2020, 8:37 AMsettings.gradle.kts
octylFractal
07/28/2020, 8:38 AMbuildscript
you're just getting a normal configuration-time Project
instance, which cannot have the project directory re-assignedjean
07/28/2020, 8:43 AMsettings.gradle.kts
compare to build.gradle.kts
good to know. Thanks for the help! I’m running in other issues but now but the projects are linked now 🙂octylFractal
07/28/2020, 8:46 AMbuild.gradle.kts
or the apply
of a plugin to a `Project`; and finally an "execution" phase where the actions of the tasks are executed.octylFractal
07/28/2020, 8:48 AMtasks.register("yourTask") {
inputs.file("someFile.txt") // this is configuration phase
doLast {
// this is in the execution phase because of `doLast`, another alternative is `doFirst`, or in a task class `@TaskAction`
print(file("someFile.txt").absolutePath)
}
}
jean
07/28/2020, 11:21 AMoctylFractal
07/28/2020, 8:23 PMjean
07/28/2020, 8:30 PMjvm("backend")
and jvm("android")
, I did not manage to import the correct target with the local setup so I ended up publishing them to a maven repo with separate attributes, which I can import from my later through gradle,without custom settings in each clients. All in all it works well now 🙂