https://kotlinlang.org logo
#feed
Title
# feed
g

gammax

06/16/2020, 5:28 PM
Hey all 👋 Sharing this small article about my Android/Kotlin template setup, and the 5 steps I do just before starting a new project: https://medium.com/@cortinico/my-android-project-template-1c0a7069ae31
👏 2
n

Nikky

06/16/2020, 8:57 PM
for managing dependencies and versions i prefer to also add https://github.com/jmfayard/refreshVersions you just declare
group:name:_
and where it sees
_
as version it looks up the version from a properties fine in the root of the project it also puts newer available versions as comments in that file and has most kotlin and android maven coordinates for projects made available like your
buildSrc
(probably not all.. but most that i ended up needing)
g

gammax

06/16/2020, 9:19 PM
Cool, I was not aware of
refreshVersion
👍 However, I was thinking about migrating to Gradle lockfiles (also as with 6.4 there is the possibility to use a single lockfile only)
n

Nikky

06/16/2020, 10:47 PM
depednency locking looks quite similar.. just the available versions are missing..
Copy code
version.kotlinx.serialization=0.20.0
##                # available=0.20.0-1.4-M1-release-99
##                # available=0.20.0-1.4-M2
##                # available=0.20.0-1.4-M3-eap-38
##                # available=0.20.0-1.4.0-dev-5730
and it allows for customization of the keys (like grouping.. since all ktor artifacts share the same version for example)
g

gammax

06/16/2020, 10:49 PM
Oh that’s really cool 🧐
j

Joost Klitsie

06/19/2020, 7:13 AM
It looks really cool (and a bit overwhelming at first 😄 ) I have a question for the android appliction: why do you apply there the multiplatform plugin instead of the application plugin? Is that necessary?
g

gammax

06/19/2020, 8:27 AM
Thanks 👍 I’m not applying the Kotlin Multiplatform plugin 🤔
j

Joost Klitsie

06/19/2020, 8:31 AM
@gammax okay I am retarded, I was meaning to write that to another project template post I saw just now as well 😄 But the first part still stands, I liked your post and the template/steps are very helpful (though be it less overwhelming, as the other one is a combining basically every app imaginable in 1 project template 🙂 )
👍 1
4 Views