hrm. no love there. i wonder if I'd have better lu...
# ktor
j
hrm. no love there. i wonder if I'd have better luck with Maven
g
Maybe you could create an example project that reproduces your problem.
j
been a while, but here's the project: https://bitbucket.org/jdlee/kotlist/src
dumb/basic, but it's a learning effort 🙂
FTR, if I use IDEA, it works. with AS, it does not. lesson learned. 🙂
g
Problem of you project with Gradle is wrong buildscript configuration. You overrider root buildscript in child projects. I’ve fixed it, just remove buildscript blocks from child repos. Also, better to use
plugins{}
block dsl instead of
buildscript
This is PR with fix
actually, there is a lot of things in config that could be improved
Also, I delete
common
module, because it’s empty and doesn’t contains gradle config
Main few fixes: 1. I removed settings.gradle in
android
, you need only one settings.gradle per project, other will be ignored 2. each module can use own buildscript, but you override it in your case. Just use one in root project. But better to rewrite config to plugins dsl instead. For now I just define all buildscript dependencies in root build.gradle, without allprojects 3. You don’t need intermidiate build.gradle in
android
, build.gradle in android:app is enough, but actually now
android
contains only
app
, so you can just flatten dirrectories 4. You have a lot of duplicate repositories declarations. You can define repos for all projects at the same time in root build.gradle, or have separate one for each module 5. You don’t need kotlin-stdlib in buildscript dependencies 6. Minor thing. You can use subprojects instead of allprojects if you don’t have any code or plugins in root project (like in your case)
j
merged the PR. thanks. 🙂
i'm not a gradle guy, so I'm cobbling things together from various sources. appreciate the clean greatly. 🙂
g
Yeah, common thing 🙂 Hope that Gradle Kotlin-DSL will change it in future, because push some good gradle practices
j
👍
got the app/demo working. presentation went well. thanks again 🙂
g
Glad to help