android-calculatorpp/app/build.gradle

159 lines
5.6 KiB
Groovy
Raw Normal View History

2015-01-20 17:50:46 -05:00
/*
* Copyright 2014 serso aka se.solovyev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Contact details
*
* Email: se.solovyev@gmail.com
* Site: http://se.solovyev.org
*/
apply plugin: 'com.android.application'
apply plugin: 'maven'
apply plugin: 'signing'
android {
compileSdkVersion versions.sdk.compile
buildToolsVersion versions.sdk.buildTools
2015-01-20 17:50:46 -05:00
defaultConfig {
applicationId "org.solovyev.android.calculator"
minSdkVersion versions.sdk.min
targetSdkVersion versions.sdk.target
2018-04-30 08:39:00 -04:00
versionCode 157
versionName '2.2.7'
2016-03-07 09:59:38 -05:00
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2015-01-20 17:50:46 -05:00
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
zipAlignEnabled true
}
debug {
2016-01-25 13:32:26 -05:00
minifyEnabled false
2016-02-07 07:36:17 -05:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-debug.cfg'
// multidex is enabled only in debug builds as in release builds proguard should
// strip all unused methods
multiDexEnabled true
}
2015-01-20 17:50:46 -05:00
}
2015-01-21 08:44:05 -05:00
lintOptions {
abortOnError false
warning 'MissingTranslation'
2016-03-23 16:32:51 -04:00
disable 'ContentDescription'
// floating icon is semi-transparent
disable 'IconLauncherShape'
2015-01-21 08:44:05 -05:00
}
2016-01-04 06:22:16 -05:00
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
2018-04-29 13:04:13 -04:00
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments = ['library': 'true']
}
}
}
2015-01-20 17:50:46 -05:00
}
dependencies {
2018-04-29 13:04:13 -04:00
implementation "com.android.support:support-v4:${versions.supportLib}"
implementation "com.android.support:appcompat-v7:${versions.supportLib}"
implementation "com.android.support:design:${versions.supportLib}"
implementation "javax.measure:jsr-275:0.9.1"
2018-04-29 13:04:13 -04:00
implementation ':square-otto:1.3.9-SNAPSHOT'
annotationProcessor ':square-otto:1.3.9-SNAPSHOT'
annotationProcessor ':square-otto-compiler:1.3.9-SNAPSHOT'
2018-04-30 08:38:41 -04:00
annotationProcessor 'com.squareup:javapoet:1.9.0'
2018-04-29 13:04:13 -04:00
implementation project(':dragbutton')
implementation(project(':jscl')) {
exclude(module: 'xercesImpl')
}
2018-04-30 08:38:41 -04:00
implementation 'org.solovyev.android:checkout:1.2.1'
2018-04-29 13:04:13 -04:00
implementation 'org.solovyev.android:material:0.1.4@aar'
implementation(name: 'plotter', ext: 'aar')
implementation 'com.google.guava:guava:20.0'
implementation('org.simpleframework:simple-xml:2.6.1') {
2016-03-02 04:26:21 -05:00
exclude(module: 'stax')
2016-01-05 03:42:17 -05:00
exclude(module: 'stax-api')
exclude(module: 'xpp3')
}
2018-04-29 13:04:13 -04:00
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
2016-01-13 11:41:05 -05:00
2018-04-29 13:04:13 -04:00
implementation 'com.google.dagger:dagger:2.0.2'
annotationProcessor "com.google.dagger:dagger-compiler:2.0.2"
implementation 'javax.annotation:jsr250-api:1.0'
2016-01-13 11:41:05 -05:00
2018-04-29 13:04:13 -04:00
testImplementation 'junit:junit:4.12'
testImplementation 'net.sf.opencsv:opencsv:2.0'
2018-04-30 08:38:41 -04:00
testImplementation 'org.mockito:mockito-core:2.7.6'
testImplementation 'org.robolectric:robolectric:3.5.1'
2018-04-29 13:04:13 -04:00
testImplementation 'org.mockito:mockito-all:1.9.5'
testImplementation 'org.skyscreamer:jsonassert:1.2.3'
2016-02-22 15:04:03 -05:00
2018-04-29 13:04:13 -04:00
androidTestImplementation "com.android.support:support-annotations:${versions.supportLib}"
2018-04-30 08:38:41 -04:00
androidTestImplementation'com.android.support.test:runner:1.0.2'
androidTestImplementation'com.android.support.test:rules:1.0.2'
2018-04-29 13:04:13 -04:00
androidTestImplementation'org.hamcrest:hamcrest-library:1.3'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
2017-07-05 04:56:18 -04:00
// use version of jsr305 provided by Checkout
exclude group: 'com.google.code.findbugs', module: 'jsr305'
})}
tasks.withType(Test) {
scanForTestClasses = false
include "**/*Test.class"
exclude "**/*AndroidCalculatorEditorViewTest*"
exclude "**/*CalculatorWizardActivityTest*"
exclude "**/*OnScreenCalculatorWizardStepTest*"
exclude "**/*CalculatorWizardTest*"
exclude "**/*WizardStepTest*"
exclude "**/*AngleUnitsButtonTest*"
exclude "**/*NumeralBasesButtonTest*"
2015-01-20 17:50:46 -05:00
}
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
2015-05-11 10:16:01 -04:00
classpath += project.files(android.bootClasspath.join(File.pathSeparator))
2015-01-20 17:50:46 -05:00
configurations.compile.each { File file -> classpath += project.files(file.path) }
}
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives androidSourcesJar
archives file: file('build/outputs/apk/release/app-release.apk'), name: 'calculatorpp-app', classifier: 'signed', type: 'apk'
2015-02-10 18:37:19 -05:00
archives file: file('build/outputs/mapping/release/mapping.txt'), name: 'calculatorpp-app', classifier: 'proguard', type: 'txt'
2015-01-20 17:50:46 -05:00
}
signing {
sign configurations.archives
}
group = "org.solovyev.android"
2016-01-06 06:38:39 -05:00
version = android.defaultConfig.versionName
2015-01-20 17:50:46 -05:00