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'
|
2016-01-13 11:41:05 -05:00
|
|
|
apply plugin: 'com.neenbedankt.android-apt'
|
2015-01-20 17:50:46 -05:00
|
|
|
|
|
|
|
android {
|
2016-01-06 06:38:39 -05:00
|
|
|
compileSdkVersion 23
|
|
|
|
buildToolsVersion '23.0.2'
|
2015-01-20 17:50:46 -05:00
|
|
|
defaultConfig {
|
2016-01-07 11:15:54 -05:00
|
|
|
minSdkVersion 9
|
2016-01-06 06:38:39 -05:00
|
|
|
targetSdkVersion 23
|
|
|
|
versionCode 143
|
|
|
|
versionName '2.1.4'
|
2015-01-20 17:50:46 -05:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
|
|
|
|
zipAlignEnabled true
|
|
|
|
}
|
2015-01-27 06:38:47 -05:00
|
|
|
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'
|
2015-01-27 06:38:47 -05:00
|
|
|
}
|
2015-01-20 17:50:46 -05:00
|
|
|
}
|
2015-01-21 08:44:05 -05:00
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
2015-02-09 05:46:57 -05:00
|
|
|
warning 'MissingTranslation'
|
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
|
|
|
|
}
|
2016-02-22 15:04:03 -05:00
|
|
|
defaultConfig {
|
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
|
|
}
|
2015-01-20 17:50:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2016-01-05 11:34:03 -05:00
|
|
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
2016-01-21 05:20:43 -05:00
|
|
|
compile 'org.solovyev:common-msg:1.0.7'
|
2016-03-01 18:06:09 -05:00
|
|
|
compile 'com.android.support:support-v4:23.2.0'
|
|
|
|
compile 'com.android.support:appcompat-v7:23.2.0'
|
|
|
|
compile 'com.android.support:cardview-v7:23.2.0'
|
|
|
|
compile 'com.android.support:design:23.2.0'
|
2016-01-07 11:15:54 -05:00
|
|
|
compile('ch.acra:acra:4.7.0') {
|
2015-01-20 17:50:46 -05:00
|
|
|
exclude group: 'org.json'
|
|
|
|
}
|
2016-02-10 11:41:32 -05:00
|
|
|
compile ':measure:'
|
2016-01-26 16:36:14 -05:00
|
|
|
compile ':drag-button:1.1@aar'
|
|
|
|
compile ':square-otto:1.3.9-SNAPSHOT'
|
|
|
|
apt ':square-otto-compiler:1.3.9-SNAPSHOT'
|
|
|
|
apt 'com.squareup:javapoet:1.5.1'
|
2016-01-24 15:03:04 -05:00
|
|
|
compile(project(':jscl')) {
|
2015-01-26 04:41:52 -05:00
|
|
|
exclude(module: 'xercesImpl')
|
|
|
|
}
|
2016-02-26 06:02:37 -05:00
|
|
|
compile 'org.solovyev.android:checkout:0.7.5@aar'
|
2016-02-24 09:29:42 -05:00
|
|
|
compile 'org.solovyev.android:material:0.1.4@aar'
|
2016-01-04 06:07:43 -05:00
|
|
|
compile 'com.google.android.gms:play-services-ads:8.4.0'
|
|
|
|
compile 'com.google.android.gms:play-services-base:8.4.0'
|
|
|
|
compile 'com.google.android.gms:play-services-analytics:8.4.0'
|
2016-01-04 06:39:25 -05:00
|
|
|
compile(name: 'plotter', ext: 'aar')
|
2016-01-05 11:34:03 -05:00
|
|
|
compile('com.google.guava:guava:11.0.2') {
|
2016-01-05 03:42:17 -05:00
|
|
|
exclude(module: 'jsr305')
|
|
|
|
}
|
2016-01-05 11:34:03 -05:00
|
|
|
compile('org.simpleframework:simple-xml:2.6.1') {
|
2016-01-05 03:42:17 -05:00
|
|
|
exclude(module: 'stax-api')
|
|
|
|
exclude(module: 'xpp3')
|
|
|
|
}
|
2016-01-14 11:34:19 -05:00
|
|
|
compile 'com.jakewharton:butterknife:7.0.1'
|
2016-01-13 11:41:05 -05:00
|
|
|
|
|
|
|
compile 'com.google.dagger:dagger:2.0.2'
|
|
|
|
apt "com.google.dagger:dagger-compiler:2.0.2"
|
|
|
|
compile 'javax.annotation:jsr250-api:1.0'
|
|
|
|
|
2016-01-06 06:38:39 -05:00
|
|
|
testCompile 'junit:junit:4.12'
|
2016-01-05 11:34:03 -05:00
|
|
|
testCompile 'net.sf.opencsv:opencsv:2.0'
|
|
|
|
testCompile 'org.mockito:mockito-core:1.9.0'
|
|
|
|
testCompile 'org.robolectric:robolectric:3.0'
|
2016-01-05 11:14:14 -05:00
|
|
|
testCompile 'org.mockito:mockito-all:1.9.5'
|
|
|
|
testCompile 'org.skyscreamer:jsonassert:1.2.3'
|
2016-01-05 11:34:03 -05:00
|
|
|
testCompile(name: 'org.apache.http.legacy', ext: 'jar')
|
2016-02-22 15:04:03 -05:00
|
|
|
|
2016-03-01 18:06:09 -05:00
|
|
|
androidTestCompile 'com.android.support:support-annotations:23.2.0'
|
2016-02-22 15:04:03 -05:00
|
|
|
androidTestCompile 'com.android.support.test:runner:0.4.1'
|
|
|
|
androidTestCompile 'com.android.support.test:rules:0.4.1'
|
|
|
|
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
|
|
|
|
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
|
2016-01-05 11:14:14 -05:00
|
|
|
}
|
|
|
|
|
2016-01-29 13:30:07 -05:00
|
|
|
apt {
|
|
|
|
arguments {
|
|
|
|
'otto.generate' 'anonymous'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-05 11:14:14 -05:00
|
|
|
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
|
2015-02-10 18:37:19 -05:00
|
|
|
archives file: file('build/outputs/apk/calculatorpp-release.apk'), name: 'calculatorpp-app', classifier: 'signed', type: 'apk'
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2015-01-27 17:23:59 -05:00
|
|
|
gradle.taskGraph.afterTask { Task task ->
|
2016-03-01 18:06:09 -05:00
|
|
|
if (task.project.name == 'app') {
|
2015-01-27 17:23:59 -05:00
|
|
|
if (task.name == 'mergeReleaseResources') {
|
|
|
|
cleanGoogleServicesResources('release')
|
|
|
|
} else if (task.name == 'mergeDebugResources') {
|
|
|
|
cleanGoogleServicesResources('debug')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void cleanGoogleServicesResources(buildType) {
|
|
|
|
ant.delete(includeEmptyDirs: 'true') {
|
2016-03-01 18:06:09 -05:00
|
|
|
fileset(dir: file('./build/intermediates/res/merged/' + buildType), includes: '**/common_*')
|
2015-01-27 17:23:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-20 17:50:46 -05:00
|
|
|
group = "org.solovyev.android"
|
2016-01-06 06:38:39 -05:00
|
|
|
version = android.defaultConfig.versionName
|
2015-01-20 17:50:46 -05:00
|
|
|
|
|
|
|
uploadArchives {
|
|
|
|
repositories {
|
|
|
|
mavenDeployer {
|
|
|
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
|
|
|
|
|
|
|
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
|
|
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
|
|
|
}
|
|
|
|
|
|
|
|
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
|
|
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
|
|
|
}
|
|
|
|
|
|
|
|
pom.project {
|
2015-02-12 16:43:02 -05:00
|
|
|
artifactId = 'calculatorpp-app'
|
2015-01-20 17:50:46 -05:00
|
|
|
name 'Calculator++ Application'
|
|
|
|
packaging 'apk'
|
2015-02-12 13:15:46 -05:00
|
|
|
description 'Calculator for Android'
|
2015-01-20 17:50:46 -05:00
|
|
|
url 'https://github.com/serso/android-calculatorpp'
|
|
|
|
|
|
|
|
scm {
|
|
|
|
url 'https://github.com/serso/android-calculatorpp'
|
|
|
|
connection 'scm:https://serso@github.com/serso/android-calculatorpp.git'
|
|
|
|
developerConnection 'scm:git://github.com/serso/android-calculatorpp.git'
|
|
|
|
}
|
|
|
|
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name 'The Apache Software License, Version 2.0'
|
|
|
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
|
|
distribution 'repo'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id 'se.solovyev'
|
|
|
|
name 'Sergey Solovyev'
|
|
|
|
email 'se.solovyev@gmail.com'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|