text-editor-8000/app/build.gradle

74 lines
2.5 KiB
Groovy
Raw Normal View History

2014-12-11 18:28:54 +01:00
/*
2016-09-25 04:02:15 -05:00
* Copyright (C) 2016 Adrian Malacoda
2014-12-11 18:28:54 +01:00
* Copyright (C) 2014 Vlad Mihalachi
*
2016-09-25 04:02:15 -05:00
* This file is part of Robut Editor.
2014-12-11 18:28:54 +01:00
*
2016-09-25 04:02:15 -05:00
* Robut Editor is free software: you can redistribute it and/or modify
2014-12-11 18:28:54 +01:00
* 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.
*
2016-09-25 04:02:15 -05:00
* Robut Editor is distributed in the hope that it will be useful,
2014-12-11 18:28:54 +01:00
* 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/>.
*/
2015-03-23 15:31:39 +01:00
import java.util.regex.Pattern
2014-12-11 18:28:54 +01:00
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
2015-03-26 21:26:24 +01:00
buildToolsVersion '22.0.1'
2014-12-11 18:28:54 +01:00
defaultConfig {
2016-09-25 04:02:15 -05:00
applicationId "net.monarchpass.android.robuteditor"
2014-12-11 18:28:54 +01:00
minSdkVersion 11
targetSdkVersion 22
2016-09-25 04:02:15 -05:00
versionCode 48
versionName "1.20"
2014-12-11 18:28:54 +01:00
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
2014-12-11 18:58:22 +01:00
minifyEnabled false
2014-12-11 18:28:54 +01:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libraries:sharedCode')
}
2015-03-23 15:31:39 +01:00
task incrementVersionCode << {
println(":incrementVersionCode - Incrementing Version Code...")
def buildGradleFile = file("build.gradle")
def patternVersionCode = Pattern.compile("versionCode (\\d+)")
def buildGradleFileText = buildGradleFile.getText()
def matcherVersionCode = patternVersionCode.matcher(buildGradleFileText)
matcherVersionCode.find()
def mVersionCode = Integer.parseInt(matcherVersionCode.group(1))
def mNextVersionCode = mVersionCode + 1
def manifestContent = matcherVersionCode.replaceAll("versionCode " + mNextVersionCode)
println(":incrementVersionCode - current versionCode=" + mVersionCode);
println(":incrementVersionCode - next versionCode=" + mNextVersionCode);
buildGradleFile.write(manifestContent)
}