ghedeon
06/20/2018, 5:47 PMcom.smoothie.gyroscooter
if you can keep it flat.gildor
06/21/2018, 5:13 AMsrc/(main|test)/(kotlin|java)/
, just src/
and test/
In pure Kotlin projects, the recommended directory structure is to follow the package structure with the common root package omitted (e.g. if all the code in the project is in the “org.example.kotlin” package and its subpackages, files with the “org.example.kotlin” package should be placed directly under the source root, and files in “org.example.kotlin.foo.bar” should be in the “foo/bar” subdirectory of the source root).https://kotlinlang.org/docs/reference/coding-conventions.html
ghedeon
06/21/2018, 9:06 AMapplicationId
support. Except for libraries. There is no applicationId
for libraries and I'm not sure how to solve it yet.gildor
06/21/2018, 9:08 AMdictated by the gradle pluginnot dictated, but gradle plugin has default layout and not only on Android, same with Java projects
considering build variants and flavorsexactly, default layout is created to allow easily add some code to another source set and this source set can be used by particular build type or flavor, but if you don’t use it, I don’t think that there is any problems with it
arekolek
06/21/2018, 9:18 AMI stopped using packages for my appsdo you use modules though? or is it all in the same module in the same package
gildor
06/21/2018, 9:24 AMghedeon
06/21/2018, 9:28 AMapplicationId
to “org.example.kotlin.foo.bar”. So, the source path is src/main/java/Foo.kt
gildor
06/21/2018, 9:29 AMghedeon
06/21/2018, 9:31 AMgildor
06/21/2018, 9:32 AMghedeon
06/21/2018, 9:33 AMapplicationId
for librariesapplicationId
, if you want to get rid of nested folders in a library, you have to explicitly specify the desired package for your files (ex: package org.example.kotlin.foo.bar
). Which is not required for the app module.>dictated by the gradle plugin
not dictated, but gradle plugin has default layouttautology
data
, domain
, ui
. Probably depends on the project scale, but imho it's unnecessary.gildor
06/21/2018, 10:17 AMexplicitly specify the desired package for your files (ex:Yes, it’s true, you have to specify package. But for library you can just use any package, like)package org.example.kotlin.foo.bar
mylib
instead org.example.mylib