0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-11-15 07:25:06 +00:00
VancedMicroG/build.gradle

118 lines
3.2 KiB
Groovy
Raw Normal View History

/*
2020-07-08 18:04:23 +00:00
* SPDX-FileCopyrightText: 2013, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
buildscript {
2020-11-24 15:35:18 +00:00
ext.nlpVersion = '2.0-alpha5'
2020-07-26 10:01:03 +00:00
ext.remoteDroidGuardVersion = '0.1.2'
2020-07-08 18:04:23 +00:00
ext.safeParcelVersion = '1.6.0'
ext.wearableVersion = '0.1.1'
2020-11-06 18:31:03 +00:00
ext.kotlinVersion = '1.4.10'
2020-07-08 18:04:23 +00:00
ext.coroutineVersion = '1.3.7'
ext.annotationVersion = '1.1.0'
2020-11-06 18:31:03 +00:00
ext.appcompatVersion = '1.2.0'
ext.coreVersion = '1.3.0'
2020-07-08 18:04:23 +00:00
ext.fragmentVersion = '1.2.5'
ext.lifecycleVersion = '2.2.0'
2020-11-06 18:31:03 +00:00
ext.mediarouterVersion = '1.2.0'
2020-07-08 18:04:23 +00:00
ext.multidexVersion = '2.0.1'
2020-11-06 18:31:03 +00:00
ext.navigationVersion = '2.3.1'
2020-07-08 18:04:23 +00:00
ext.preferenceVersion = '1.1.1'
ext.recyclerviewVersion = '1.1.0'
ext.supportLibraryVersion = '28.0.0'
ext.slf4jVersion = '1.7.25'
2020-09-27 09:40:22 +00:00
ext.volleyVersion = '1.1.1'
ext.wireVersion = '3.2.2'
2020-07-08 18:04:23 +00:00
2020-11-06 18:31:03 +00:00
ext.androidBuildGradleVersion = '4.1.0'
2020-07-08 18:04:23 +00:00
ext.androidBuildVersionTools = '29.0.3'
2020-07-08 18:04:23 +00:00
ext.androidMinSdk = 14
ext.androidTargetSdk = 29
ext.androidCompileSdk = 30
2020-07-08 18:04:23 +00:00
repositories {
jcenter()
google()
}
2020-07-08 18:04:23 +00:00
dependencies {
2020-07-08 18:04:23 +00:00
classpath "com.android.tools.build:gradle:$androidBuildGradleVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.squareup.wire:wire-gradle-plugin:$wireVersion"
}
}
2020-07-08 18:04:23 +00:00
def execResult(...args) {
def stdout = new ByteArrayOutputStream()
exec {
commandLine args
standardOutput = stdout
}
return stdout.toString().trim()
}
2020-11-18 18:21:26 +00:00
def gmsVersion = "20.42.15"
2020-07-08 18:04:23 +00: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
}
allprojects {
apply plugin: 'idea'
2020-07-08 18:04:23 +00:00
group = 'org.microg.gms'
version = ourVersionName
ext.appVersionCode = ourVersionCode
ext.isReleaseVersion = false
}
2020-07-08 18:04:23 +00:00
@Deprecated
def androidCompileSdk() { return androidCompileSdk }
2020-07-08 18:04:23 +00:00
@Deprecated
def androidTargetSdk() { return androidTargetSdk }
2020-07-08 18:04:23 +00:00
@Deprecated
def androidMinSdk() { return androidMinSdk }
2020-07-08 18:04:23 +00:00
@Deprecated
def versionCode() {
2020-07-08 18:04:23 +00:00
return ourVersionCode
}
2020-07-08 18:04:23 +00:00
@Deprecated
def versionName() {
2020-07-08 18:04:23 +00:00
return ourVersionName
}
subprojects {
repositories {
jcenter()
google()
}
}