text-editor-8000/app/build.gradle
2018-06-23 03:47:51 -05:00

90 lines
3.1 KiB
Groovy

/*
* Copyright (C) 2016 Adrian Malacoda
* Copyright (C) 2014 Vlad Mihalachi
*
* This file is part of Text Editor 8000.
*
* Text Editor 8000 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.
*
* Text Editor 8000 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/>.
*/
import java.util.regex.Pattern
apply plugin: 'com.android.application'
android {
lintOptions {
disable 'MissingTranslation', 'ExtraTranslation'
}
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "net.monarchpass.android.robuteditor"
minSdkVersion 15
targetSdkVersion 22
versionCode 48
versionName "1.20"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile project(':libraries:sharedCode')
//compile 'com.spazedog.lib:rootfw_gen4:+@aar'
compile project(':libraries:FloatingActionButton')
compile 'org.apache.commons:commons-lang3:+'
compile 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3'
compile('com.android.support:appcompat-v7:22.+') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.android.support:support-v4:22.+'
compile 'com.github.gabrielemariotti.changeloglib:library:+'
compile 'commons-io:commons-io:2.4'
compile 'com.android.support:support-annotations:+'
compile 'com.atlassian.commonmark:commonmark:0.11.0'
}
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)
}