fossasia / open-event-attendee-android

Open Event Attendee Android General App https://github.com/fossasia/open-event-android/blob/apk/open-event-dev-app-playStore-debug.apk
Apache License 2.0
1.95k stars 553 forks source link

[Maintainence] Make separate dependencies file for maintaining all dependencies/libraries #1410

Open RotBolt opened 5 years ago

RotBolt commented 5 years ago

Describe the chore Make a separate dependencies file to list all dependencies version number / libraries versions and reference those versions in build.gradle files

This would include dependencies.gradle file which would contain all versions of dependencies/ libraries used . This would help us in maintaining/ adding the future dependencies .

Would you like to work on the issue?

RotBolt commented 5 years ago

@iamareebjamal could you give your opinion ?

iamareebjamal commented 5 years ago

Not all, only repeated ones

Skrilltrax commented 5 years ago

@iamareebjamal @mariobehling is it okay to convert gradle files to kts files ? We can use buildSrc with dependencies update gradle plugin.

Here are some other benefits to this : https://medium.com/mindorks/migrating-gradle-build-scripts-to-kotlin-dsl-89788a4e383a

Medium
Migrating Gradle Build Scripts to Kotlin DSL
Howdy people! It’s bean a while since Gradle released support for Kotlin scripts. We have been writing Gradle script in a language called…
iamareebjamal commented 5 years ago

Yes, please go ahead and share before and after build durations after ./gradlew clean

Skrilltrax commented 5 years ago

@iamareebjamal almost done with the kotlin dsl, the build times are as follows (benchmarked with hyperfine)

Groovy Clean Build - 171.838s Next Build - 13.375s

Kotlin Clean Build - 149.667s Next Build - 10.113s

Skrilltrax commented 5 years ago

However i had some difficulty with signingConfigs and playStoreImplementation

1) Are signingConfig variables like SIGNING_KEY_FILE, ALIAS, KEY_ALIAS and STORE_PASS in local.properties because the gradle local properties plugin is not compatible with kotlin dsl.

2) Is playStoreImplementation a custom config because the kotlin dsl cannot find it.

iamareebjamal commented 5 years ago
  1. It is fine if it is not supported, but it is still important to load them from environment variable
  2. No it is not custom config. It's standard config defined in Android Gradle Plugin
adityastic commented 5 years ago

@Skrilltrax playStoreImplementation is a flavour specifc dependency configuration

Skrilltrax commented 5 years ago

@iamareebjamal I'm doing both but i am not using the plugin, so should i remove it ? can you also please confirm if i should keep AndroidConfig object in the PR, I made it but then it seemed kinda overkill.

@adityastic Thanks, the dsl does not automatically recognise it so i'll be using property delegation for that.

iamareebjamal commented 5 years ago

Remove both

Skrilltrax commented 5 years ago

Updated PR