mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
build: improve regsub pattern for setting buildToolsVersion
This addresses the discussion in !64 https://gitlab.com/fdroid/fdroidserver/merge_requests/64 Sometimes, buildToolsVersion is a kind of gradle macro call, and other times it is a variable assignment. This regsub pattern now handles both of those cases.
This commit is contained in:
parent
6db6433e97
commit
d53a5af715
10 changed files with 717 additions and 8 deletions
66
tests/source-files/Zillode/syncthing-silk/build.gradle
Normal file
66
tests/source-files/Zillode/syncthing-silk/build.gradle
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright (c) 2015 OpenSilk Productions LLC
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.1.3'
|
||||
classpath 'me.tatarka:gradle-retrolambda:2.5.0'
|
||||
classpath 'org.robolectric:robolectric-gradle-plugin:1.0.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven { url '../../m2/repository' }
|
||||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||
}
|
||||
}
|
||||
|
||||
// Build config
|
||||
ext.compileSdkVersion = 22
|
||||
ext.buildToolsVersion = "22.0.1"
|
||||
|
||||
// defaultConfig
|
||||
ext.targetSdkVersion = 22
|
||||
|
||||
ext.supportLibVersion = "22.1.1"
|
||||
ext.dagger2Version = "2.0"
|
||||
ext.rxAndroidVersion = "0.23.0"
|
||||
ext.timberVersion = "2.5.0"
|
||||
ext.commonsLangVersion = "3.3.2"
|
||||
ext.butterKnifeVersion = "6.0.0"
|
||||
ext.commonsIoVersion = "2.4"
|
||||
ext.gsonVersion = "2.3"
|
||||
|
||||
def gitSha() {
|
||||
return 'git rev-parse --short HEAD'.execute().text.trim()
|
||||
}
|
||||
|
||||
def getDebugVersionSuffix() {
|
||||
return "${gitSha()}".isEmpty() ? "-SNAPSHOT" : "-SNAPSHOT-${gitSha()}"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue