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 {
|
2021-07-01 12:22:28 +02:00
|
|
|
ext.cronetVersion = '91.0.4472.120.1'
|
2022-02-01 20:23:12 +01:00
|
|
|
ext.nlpVersion = '2.0-alpha8'
|
2020-12-12 12:40:48 +01:00
|
|
|
ext.safeParcelVersion = '1.7.0'
|
2020-07-08 20:04:23 +02:00
|
|
|
ext.wearableVersion = '0.1.1'
|
|
|
|
|
2022-01-18 18:44:18 +01:00
|
|
|
ext.kotlinVersion = '1.6.10'
|
2021-12-06 18:31:21 +01:00
|
|
|
ext.coroutineVersion = '1.5.2'
|
2020-07-08 20:04:23 +02:00
|
|
|
|
2021-05-10 16:25:20 +02:00
|
|
|
ext.annotationVersion = '1.2.0'
|
2022-01-24 19:11:36 +01:00
|
|
|
ext.appcompatVersion = '1.4.1'
|
2022-01-18 18:44:18 +01:00
|
|
|
ext.coreVersion = '1.7.0'
|
|
|
|
ext.fragmentVersion = '1.4.0'
|
|
|
|
ext.lifecycleVersion = '2.4.0'
|
|
|
|
ext.mediarouterVersion = '1.2.5'
|
2020-07-08 20:04:23 +02:00
|
|
|
ext.multidexVersion = '2.0.1'
|
2021-05-10 16:25:20 +02:00
|
|
|
ext.navigationVersion = '2.3.5'
|
2020-07-08 20:04:23 +02:00
|
|
|
ext.preferenceVersion = '1.1.1'
|
2022-01-18 18:44:18 +01:00
|
|
|
ext.recyclerviewVersion = '1.2.0'
|
2021-05-05 23:29:02 +02:00
|
|
|
ext.webkitVersion = '1.4.0'
|
2020-07-08 20:04:23 +02:00
|
|
|
|
2020-08-01 22:21:23 +02:00
|
|
|
ext.slf4jVersion = '1.7.25'
|
2021-10-07 10:20:42 +02:00
|
|
|
ext.volleyVersion = '1.2.1'
|
2020-08-01 22:21:23 +02:00
|
|
|
ext.wireVersion = '3.2.2'
|
2020-07-08 20:04:23 +02:00
|
|
|
|
2022-01-18 18:44:18 +01:00
|
|
|
ext.androidBuildGradleVersion = '7.0.4'
|
2020-07-08 20:04:23 +02:00
|
|
|
|
2021-05-10 16:25:20 +02:00
|
|
|
ext.androidBuildVersionTools = '30.0.2'
|
2020-07-08 20:04:23 +02:00
|
|
|
|
|
|
|
ext.androidMinSdk = 14
|
|
|
|
ext.androidTargetSdk = 29
|
2022-01-18 18:44:18 +01:00
|
|
|
ext.androidCompileSdk = 31
|
2020-07-08 20:04:23 +02:00
|
|
|
|
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-08 20:04:23 +02:00
|
|
|
classpath "com.android.tools.build:gradle:$androidBuildGradleVersion"
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
2020-08-01 22:21:23 +02:00
|
|
|
classpath "com.squareup.wire:wire-gradle-plugin:$wireVersion"
|
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()
|
|
|
|
}
|
|
|
|
|
2022-01-24 19:53:07 +01:00
|
|
|
def gmsVersion = "21.48.16"
|
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 gitCommitId = execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').split(' ')[0]
|
|
|
|
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)
|
|
|
|
def ourVersionName = "$ourVersionBase.$gmsVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "")
|
|
|
|
logger.lifecycle('Starting build for version {} ({})...', ourVersionName, ourVersionCode)
|
|
|
|
|
|
|
|
@Deprecated
|
|
|
|
String getMyVersionName() {
|
|
|
|
return ourVersionName
|
|
|
|
}
|
|
|
|
|
|
|
|
@Deprecated
|
|
|
|
int getMyVersionCode() {
|
|
|
|
return 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
|
|
|
|
}
|
|
|
|
|
2020-07-08 20:04:23 +02:00
|
|
|
@Deprecated
|
|
|
|
def androidCompileSdk() { return androidCompileSdk }
|
2016-08-27 12:50:34 +02:00
|
|
|
|
2020-07-08 20:04:23 +02:00
|
|
|
@Deprecated
|
|
|
|
def androidTargetSdk() { return androidTargetSdk }
|
2016-08-27 12:50:34 +02:00
|
|
|
|
2020-07-08 20:04:23 +02:00
|
|
|
@Deprecated
|
|
|
|
def androidMinSdk() { return androidMinSdk }
|
2016-08-27 12:50:34 +02:00
|
|
|
|
2020-07-08 20:04:23 +02:00
|
|
|
@Deprecated
|
2016-08-27 12:50:34 +02:00
|
|
|
def versionCode() {
|
2020-07-08 20:04:23 +02:00
|
|
|
return ourVersionCode
|
2016-08-27 12:50:34 +02:00
|
|
|
}
|
|
|
|
|
2020-07-08 20:04:23 +02:00
|
|
|
@Deprecated
|
2016-08-27 12:50:34 +02:00
|
|
|
def versionName() {
|
2020-07-08 20:04:23 +02:00
|
|
|
return ourVersionName
|
2016-08-27 12:50:34 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|