android-calculatorpp/app/build.gradle

223 lines
8.0 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: 'signing'
2023-09-15 04:08:16 -04:00
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
2023-09-15 05:29:30 -04:00
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
2015-01-20 17:50:46 -05:00
android {
2023-09-15 04:08:16 -04:00
compileSdk versions.sdk.compile
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'
2023-09-15 04:08:16 -04:00
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildFeatures {
dataBinding true
viewBinding true
2015-01-20 17:50:46 -05:00
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
}
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
}
2023-09-15 04:08:16 -04:00
namespace 'org.solovyev.android.calculator'
lint {
2015-01-21 08:44:05 -05:00
abortOnError false
2023-09-15 04:08:16 -04:00
disable 'ContentDescription', 'IconLauncherShape'
warning 'MissingTranslation'
2015-01-21 08:44:05 -05:00
}
2023-09-15 04:08:16 -04:00
testOptions {
unitTests {
includeAndroidResources = true
}
2016-01-04 06:22:16 -05:00
}
2023-09-15 04:08:16 -04:00
}
2018-04-29 13:04:13 -04:00
2023-09-15 04:08:16 -04:00
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
2018-04-29 13:04:13 -04:00
}
2015-01-20 17:50:46 -05:00
}
dependencies {
2023-09-15 04:08:16 -04:00
implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"
implementation "androidx.viewpager:viewpager:1.1.0-alpha01"
implementation "androidx.preference:preference-ktx:1.2.1"
implementation 'com.google.android.material:material:1.9.0'
2018-04-29 13:04:13 -04:00
implementation ':measure:'
implementation ':square-otto:1.3.9-SNAPSHOT'
2023-09-15 04:08:16 -04:00
kapt ':square-otto:1.3.9-SNAPSHOT'
kapt ':square-otto-compiler:1.3.9-SNAPSHOT'
kapt 'com.squareup:javapoet:1.9.0'
implementation project(':plotter:lib')
2018-04-29 13:04:13 -04:00
implementation project(':dragbutton')
implementation(project(':jscl')) {
exclude(module: 'xercesImpl')
}
2023-09-15 04:08:16 -04:00
implementation 'org.solovyev.android:checkout:1.3.0'
2023-09-15 05:29:30 -04:00
implementation platform('com.google.firebase:firebase-bom:32.2.3')
implementation "com.google.firebase:firebase-crashlytics"
implementation "com.google.firebase:firebase-analytics"
implementation 'com.google.android.gms:play-services-ads:22.4.0'
2023-09-15 04:08:16 -04:00
implementation 'com.google.guava:guava:32.1.2-android'
implementation('org.simpleframework:simple-xml:2.7.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')
}
2016-01-13 11:41:05 -05:00
2018-04-29 13:04:13 -04:00
implementation 'com.google.dagger:dagger:2.0.2'
2023-09-15 04:08:16 -04:00
kapt "com.google.dagger:dagger-compiler:2.0.2"
implementation 'javax.annotation:javax.annotation-api:1.3.2'
kapt "javax.annotation:javax.annotation-api:1.3.2"
2016-01-13 11:41:05 -05:00
2023-09-15 04:08:16 -04:00
testImplementation 'junit:junit:4.13.2'
2018-04-29 13:04:13 -04:00
testImplementation 'net.sf.opencsv:opencsv:2.0'
2023-09-15 04:08:16 -04:00
testImplementation 'org.mockito:mockito-core:5.3.1'
testImplementation 'org.robolectric:robolectric:4.10.3'
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
2018-04-29 13:04:13 -04:00
testImplementation(name: 'org.apache.http.legacy', ext: 'jar')
2016-02-22 15:04:03 -05:00
2023-09-15 04:08:16 -04:00
androidTestImplementation 'androidx.annotation:annotation:1.7.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test:rules:1.5.0'
2018-04-29 13:04:13 -04:00
androidTestImplementation'org.hamcrest:hamcrest-library:1.3'
2023-09-15 04:08:16 -04:00
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
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"
2023-09-15 04:08:16 -04:00
exclude "**/*BaseCalculatorTest*"
exclude "**/*AndroidCalculatorEditorViewTest*"
exclude "**/*CalculatorWizardActivityTest*"
exclude "**/*OnScreenCalculatorWizardStepTest*"
exclude "**/*CalculatorWizardTest*"
exclude "**/*WizardStepTest*"
exclude "**/*AngleUnitsButtonTest*"
exclude "**/*NumeralBasesButtonTest*"
2015-01-20 17:50:46 -05:00
}
2023-09-15 04:08:16 -04:00
/*
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
uploadArchives {
repositories {
mavenDeployer {
2017-07-04 11:06:25 -04:00
beforeDeployment { MavenDeployment deployment ->
signing.signPom(deployment)
// for some reason Gradle :uploadArchives tries to upload null.txt.asc and null.map artifacts.
// As we don't want those let's filter them now (note that these files are not included in the
// list of project artifacts, so their origin is not clear)
def removeCond = { artifact -> return !artifact.classifier && (artifact.type == "map" || artifact.type == "txt.asc") }
deployment.artifacts.removeAll(removeCond)
deployment.attachedArtifacts.removeAll(removeCond)
}
2015-01-20 17:50:46 -05:00
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'
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'
}
}
}
}
}
2018-04-30 08:30:18 -04:00
}
2023-09-15 04:08:16 -04:00
*/