2016-08-27 12:50:34 +02:00
|
|
|
/*
|
2020-07-08 20:04:23 +02:00
|
|
|
* SPDX-FileCopyrightText: 2013, microG Project Team
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-08-27 12:50:34 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
buildscript {
|
2020-07-08 20:04:23 +02:00
|
|
|
ext.nlpVersion = '2.0-alpha1'
|
|
|
|
ext.remoteDroidGuardVersion = '0.1.1'
|
|
|
|
ext.safeParcelVersion = '1.6.0'
|
|
|
|
ext.wearableVersion = '0.1.1'
|
|
|
|
|
|
|
|
ext.kotlinVersion = '1.3.72'
|
|
|
|
ext.coroutineVersion = '1.3.7'
|
|
|
|
|
|
|
|
ext.annotationVersion = '1.1.0'
|
|
|
|
ext.appcompatVersion = '1.1.0'
|
|
|
|
ext.fragmentVersion = '1.2.5'
|
|
|
|
ext.lifecycleVersion = '2.2.0'
|
|
|
|
ext.mediarouterVersion = '1.1.0'
|
|
|
|
ext.multidexVersion = '2.0.1'
|
|
|
|
ext.navigationVersion = '2.3.0'
|
|
|
|
ext.preferenceVersion = '1.1.1'
|
|
|
|
ext.recyclerviewVersion = '1.1.0'
|
|
|
|
|
|
|
|
ext.supportLibraryVersion = "28.0.0"
|
|
|
|
ext.slf4jVersion = "1.7.25"
|
|
|
|
|
2020-07-21 14:44:37 +02:00
|
|
|
ext.androidBuildGradleVersion = "4.0.1"
|
2020-07-08 20:04:23 +02:00
|
|
|
|
|
|
|
ext.androidBuildVersionTools = "29.0.3"
|
|
|
|
|
2020-07-21 14:43:41 +02:00
|
|
|
ext.androidMinSdk = 21
|
2020-07-08 20:04:23 +02:00
|
|
|
ext.androidTargetSdk = 29
|
|
|
|
ext.androidCompileSdk = 29
|
|
|
|
|
2016-08-27 12:50:34 +02:00
|
|
|
repositories {
|
|
|
|
jcenter()
|
2018-01-02 01:45:43 +01:00
|
|
|
google()
|
2016-08-27 12:50:34 +02:00
|
|
|
}
|
2020-07-08 20:04:23 +02:00
|
|
|
|
2016-08-27 12:50:34 +02:00
|
|
|
dependencies {
|
2020-07-21 12:05:05 +02:00
|
|
|
classpath 'com.android.tools.build:gradle:4.0.1'
|
2020-07-08 20:04:23 +02:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
2016-08-27 12:50:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-08 20:04:23 +02:00
|
|
|
def execResult(...args) {
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine args
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
return stdout.toString().trim()
|
|
|
|
}
|
|
|
|
|
2020-07-21 14:27:19 +02:00
|
|
|
def gmsVersion = "69.4.20"
|
2020-07-08 20:04:23 +02:00
|
|
|
def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', ''))
|
|
|
|
def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').substring(1)
|
|
|
|
def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD"))
|
|
|
|
def gitDirty = execResult('git', 'status', '--porcelain').size() > 0
|
|
|
|
def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.'))
|
|
|
|
def ourVersionMinor = Integer.parseInt(ourVersionBase.substring(ourVersionBase.lastIndexOf('.') + 1))
|
|
|
|
def ourVersionCode = gmsVersionCode * 1000 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0)
|
2020-07-16 23:22:21 +02:00
|
|
|
def ourVersionName = "$ourVersionBase.$gmsVersionCode" + "-vanced"
|
2020-07-08 20:04:23 +02:00
|
|
|
logger.lifecycle('Starting build for version {} ({})...', ourVersionName, ourVersionCode)
|
|
|
|
|
2016-08-27 12:50:34 +02:00
|
|
|
allprojects {
|
|
|
|
apply plugin: 'idea'
|
2020-07-08 20:04:23 +02:00
|
|
|
|
|
|
|
group = 'org.microg.gms'
|
|
|
|
version = ourVersionName
|
|
|
|
ext.appVersionCode = ourVersionCode
|
2016-08-27 12:50:34 +02:00
|
|
|
ext.isReleaseVersion = false
|
|
|
|
}
|
|
|
|
|
2016-08-14 10:41:56 +02:00
|
|
|
subprojects {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
2018-04-01 07:00:24 +02:00
|
|
|
google()
|
2016-08-27 12:50:34 +02:00
|
|
|
}
|
2016-08-14 10:41:56 +02:00
|
|
|
}
|
|
|
|
|