Colton Idle
03/04/2025, 5:12 PMsubprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint") // Version should be inherited from parent
// Optionally configure plugin
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
debug.set(true)
}
}
but I get an error on one of my "modules that contains other modules"
What went wrong:
Could not read script '/Users/cidle/dev/myapp/analytics/org.jlleitschuh.gradle.ktlint'my hunch is because my
analytics
"module" doesn't have a build.gradle.kts. instead it contains base
and android
which do have build.gradle.kts. How can I address my issue?Vampire
03/04/2025, 5:31 PMmodules that has modules contained in it (i'm not sure what that's called)No special name as there is nothing special, just a project with subprojects.
my hunch is because myThat should not really be relevant, a project is a project, whether it has an explicit build script or not. Especially as you configure it using the highly discouraged bad-practice cross-project configuration ("module" doesn't have a build.gradle.kts. instead it containsanalytics
andbase
which do have build.gradle.ktsandroid
subprojects { ... }
) and thus also configure that.
Without the full error message, especially --stacktrace
or optimally a build --scan
URL, it is hard to say what that error could mean, at least for people not knowing that error in particular.
If it really is the absence of the build script and you want to continue following the evil road, just add a condition to only apply the plugin if the project has a build script. 🤷♂️pablozki
03/04/2025, 6:10 PM../
Vampire
03/04/2025, 6:11 PMColton Idle
03/04/2025, 8:39 PMVampire
03/04/2025, 8:49 PMColton Idle
03/04/2025, 9:05 PM