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 android_sdk_version()
|
|
|
|
buildToolsVersion android_build_tools_version()
|
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion android_min_sdk_version()
|
|
|
|
targetSdkVersion android_sdk_version()
|
|
|
|
versionCode version_code()
|
|
|
|
versionName version_name()
|
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'
|
|
|
|
zipAlignEnabled true
|
|
|
|
}
|
2015-01-27 06:38:47 -05:00
|
|
|
debug {
|
2015-01-27 13:35:43 -05:00
|
|
|
minifyEnabled false
|
2015-01-27 06:38:47 -05:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-debug.cfg'
|
|
|
|
}
|
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
|
|
|
}
|
2015-01-20 17:50:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
2015-01-26 04:41:52 -05:00
|
|
|
compile project(':core')
|
|
|
|
compile 'org.solovyev:common-core:1.0.7'
|
|
|
|
compile 'org.solovyev:common-text:1.0.7'
|
|
|
|
compile 'org.solovyev:common-security:1.0.7'
|
2015-01-20 17:50:46 -05:00
|
|
|
compile 'com.android.support:support-v4:21.0.3'
|
2015-01-27 09:08:47 -05:00
|
|
|
compile 'com.android.support:appcompat-v7:21.0.3'
|
|
|
|
compile('ch.acra:acra:4.5.0') {
|
2015-01-20 17:50:46 -05:00
|
|
|
exclude group: 'org.json'
|
|
|
|
}
|
|
|
|
compile 'org.solovyev.android:android-common-lists:1.1.18@aar'
|
|
|
|
compile 'org.solovyev.android:android-common-core:1.1.18@aar'
|
|
|
|
compile 'org.solovyev.android:android-common-other:1.1.18@aar'
|
2015-01-26 04:41:52 -05:00
|
|
|
compile 'org.solovyev.android:android-common-views:1.1.18@aar'
|
|
|
|
compile 'org.solovyev.android:android-common-menus:1.1.18@aar'
|
|
|
|
compile 'org.solovyev.android:android-common-preferences:1.1.18@aar'
|
|
|
|
compile('org.solovyev:jscl:1.0.8') {
|
|
|
|
exclude(module: 'xercesImpl')
|
|
|
|
}
|
2015-02-10 05:23:07 -05:00
|
|
|
compile 'org.solovyev.android:checkout:0.7.1@aar'
|
2015-01-28 16:46:39 -05:00
|
|
|
compile 'org.solovyev.android:material:0.1.2@aar'
|
2015-01-27 17:23:59 -05:00
|
|
|
compile 'com.google.android.gms:play-services-ads:6.5.87@aar'
|
|
|
|
compile 'com.google.android.gms:play-services-base:6.5.87@aar'
|
2015-01-26 16:39:01 -05:00
|
|
|
compile 'com.melnykov:floatingactionbutton:1.1.0'
|
2015-01-20 17:50:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
task androidJavadocs(type: Javadoc) {
|
|
|
|
source = android.sourceSets.main.java.srcDirs
|
|
|
|
classpath += project.files(android.plugin.getBootClasspath().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
|
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 ->
|
|
|
|
if (task.project.name == 'android-app') {
|
|
|
|
if (task.name == 'mergeReleaseResources') {
|
|
|
|
cleanGoogleServicesResources('release')
|
|
|
|
} else if (task.name == 'mergeDebugResources') {
|
|
|
|
cleanGoogleServicesResources('debug')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void cleanGoogleServicesResources(buildType) {
|
|
|
|
ant.delete(includeEmptyDirs: 'true') {
|
|
|
|
fileset(dir: file('./build/intermediates/res/' + buildType), includes: '**/common_signin*')
|
|
|
|
}
|
|
|
|
ant.delete(includeEmptyDirs: 'true') {
|
|
|
|
fileset(dir: file('./build/intermediates/res/' + buildType), includes: '**/ic_plusone*')
|
|
|
|
}
|
|
|
|
ant.delete(includeEmptyDirs: 'true') {
|
|
|
|
fileset(dir: file('./build/intermediates/res/' + buildType), includes: '**/powered_by_google*')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-20 17:50:46 -05:00
|
|
|
group = "org.solovyev.android"
|
|
|
|
version = version_name()
|
|
|
|
|
|
|
|
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 {
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|