blob: 671c5561e2a4d4914e6cbe855c945510a905ba14 [file] [log] [blame]
Gabriel Peal69ab3f12017-12-11 16:35:38 -05001import org.ajoberstar.grgit.Grgit
Gabriel Peal853f5db2016-08-12 13:43:54 -07002
3buildscript {
Gabriel Pealcb842892019-06-03 12:35:30 +02004 ext.kotlinVersion = '1.3.31'
Gabriel Pealdf5b4b82017-07-01 16:43:26 -07005
Felipe Lima29a482b2017-02-28 09:42:27 -08006 repositories {
7 jcenter()
Gabriel Peal6f8bdd22017-12-12 12:55:27 -05008 google()
Gabriel Pealc5193552019-08-10 19:25:57 -07009 maven {
10 url "https://plugins.gradle.org/m2/"
11 }
Felipe Lima29a482b2017-02-28 09:42:27 -080012 }
13 dependencies {
Gabriel Peal69ab3f12017-12-11 16:35:38 -050014 classpath 'org.ajoberstar:grgit:1.9.3'
Gabriel Pealc476cc62018-09-24 23:19:47 -070015 classpath 'com.android.tools.build:gradle:3.2.0'
Gabriel Peal0e9ee812017-08-27 13:55:58 -070016 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
17 classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion"
Gabriel Peal69ab3f12017-12-11 16:35:38 -050018 classpath 'org.ajoberstar:grgit:1.9.3'
Gabriel Pealc5193552019-08-10 19:25:57 -070019 classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.6"
Felipe Lima29a482b2017-02-28 09:42:27 -080020 }
Gabriel Peal853f5db2016-08-12 13:43:54 -070021}
22
23allprojects {
Felipe Lima29a482b2017-02-28 09:42:27 -080024 repositories {
Felipe Limaa78062e2017-08-10 23:57:33 -070025 google()
Sneh Pandyab0064c32018-06-12 23:28:31 +053026 jcenter()
Gabriel Pealf95b9d42017-07-02 20:44:23 -070027 maven {
28 url "https://jitpack.io"
29 }
Gabriel Pealc476cc62018-09-24 23:19:47 -070030 maven {
31 url "https://oss.sonatype.org/content/repositories/snapshots/"
32 }
Gabriel Peal69ab3f12017-12-11 16:35:38 -050033 flatDir {
34 dirs 'libs'
35 }
Felipe Lima29a482b2017-02-28 09:42:27 -080036 }
Gabriel Peal853f5db2016-08-12 13:43:54 -070037}
38
Gabriel Peal69ab3f12017-12-11 16:35:38 -050039ext {
40 git = Grgit.open()
41 gitSha = git.head().id
42 gitBranch = git.branch.getCurrent().name
43}
44
Gabriel Peal853f5db2016-08-12 13:43:54 -070045task clean(type: Delete) {
Felipe Lima29a482b2017-02-28 09:42:27 -080046 delete rootProject.buildDir
Gabriel Peal853f5db2016-08-12 13:43:54 -070047}