c67dc96d57
This vendors the jscience javax.measure package, extracted from https://repo1.maven.org/maven2/org/jscience/jscience/4.3.1/jscience-4.3.1-sources.jar Using this package as a dependency leads to conflicting classes, which we can't solve from gradle. Instead of repackaging the jar file the easiest solution seems to be to vendor the sources we need.
159 lines
5.6 KiB
Groovy
159 lines
5.6 KiB
Groovy
/*
|
|
* 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
|
|
defaultConfig {
|
|
applicationId "org.solovyev.android.calculator"
|
|
minSdkVersion versions.sdk.min
|
|
targetSdkVersion versions.sdk.target
|
|
versionCode 158
|
|
versionName '2.2.7'
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
|
|
zipAlignEnabled true
|
|
}
|
|
debug {
|
|
minifyEnabled false
|
|
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
|
|
}
|
|
}
|
|
lintOptions {
|
|
abortOnError false
|
|
warning 'MissingTranslation'
|
|
disable 'ContentDescription'
|
|
// floating icon is semi-transparent
|
|
disable 'IconLauncherShape'
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
targetCompatibility JavaVersion.VERSION_1_7
|
|
}
|
|
|
|
defaultConfig {
|
|
javaCompileOptions {
|
|
annotationProcessorOptions {
|
|
arguments = ['library': 'true']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation "com.android.support:support-v4:${versions.supportLib}"
|
|
implementation "com.android.support:appcompat-v7:${versions.supportLib}"
|
|
implementation "com.android.support:design:${versions.supportLib}"
|
|
implementation project(":measure")
|
|
implementation 'com.squareup:otto:1.3.9-SNAPSHOT'
|
|
annotationProcessor 'com.squareup:otto:1.3.9-SNAPSHOT'
|
|
annotationProcessor 'com.squareup:otto-compiler:1.3.9-SNAPSHOT'
|
|
annotationProcessor 'com.squareup:javapoet:1.9.0'
|
|
implementation project(':dragbutton')
|
|
implementation(project(':jscl')) {
|
|
exclude(module: 'xercesImpl')
|
|
}
|
|
implementation 'org.solovyev.android:checkout:1.2.1'
|
|
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') {
|
|
exclude(module: 'stax')
|
|
exclude(module: 'stax-api')
|
|
exclude(module: 'xpp3')
|
|
}
|
|
implementation 'com.jakewharton:butterknife:8.8.1'
|
|
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
|
|
|
|
implementation 'com.google.dagger:dagger:2.0.2'
|
|
annotationProcessor "com.google.dagger:dagger-compiler:2.0.2"
|
|
implementation 'javax.annotation:jsr250-api:1.0'
|
|
|
|
testImplementation 'junit:junit:4.12'
|
|
testImplementation 'net.sf.opencsv:opencsv:2.0'
|
|
testImplementation 'org.mockito:mockito-core:2.7.6'
|
|
testImplementation 'org.robolectric:robolectric:3.5.1'
|
|
testImplementation 'org.mockito:mockito-all:1.9.5'
|
|
testImplementation 'org.skyscreamer:jsonassert:1.2.3'
|
|
|
|
androidTestImplementation "com.android.support:support-annotations:${versions.supportLib}"
|
|
androidTestImplementation'com.android.support.test:runner:1.0.2'
|
|
androidTestImplementation'com.android.support.test:rules:1.0.2'
|
|
androidTestImplementation'org.hamcrest:hamcrest-library:1.3'
|
|
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
|
// 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*"
|
|
}
|
|
|
|
task androidJavadocs(type: Javadoc) {
|
|
source = android.sourceSets.main.java.srcDirs
|
|
classpath += project.files(android.bootClasspath.join(File.pathSeparator))
|
|
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'
|
|
archives file: file('build/outputs/mapping/release/mapping.txt'), name: 'calculatorpp-app', classifier: 'proguard', type: 'txt'
|
|
}
|
|
|
|
signing {
|
|
sign configurations.archives
|
|
}
|
|
|
|
group = "org.solovyev.android"
|
|
version = android.defaultConfig.versionName
|
|
|