aboutsummaryrefslogtreecommitdiffstats
path: root/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle165
1 files changed, 103 insertions, 62 deletions
diff --git a/build.gradle b/build.gradle
index 5941beaf..68b1b2f2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,77 +1,118 @@
-apply plugin: 'java'
-apply plugin: 'eclipse'
-apply plugin: 'osgi'
-apply plugin: 'nexus'
-
+// Top-level build file where you can add configuration options common to all
+// sub-projects/modules.
buildscript {
- repositories {
- jcenter()
- mavenLocal()
- mavenCentral()
- }
-
- dependencies {
- classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7.1'
- }
+ repositories {
+ jcenter()
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:0.12.2'
+ }
}
-group = 'de.measite.minidns'
-description = "A minimal DNS client library with support for A, AAAA, NS and SRV records"
-sourceCompatibility = 1.7
-version = 'git tag --points-at HEAD'.execute().text.trim()
-isSNAPSHOT = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim() == 'master'
-
-if (isSNAPSHOT) {
- version = version + '-SNAPSHOT'
+allprojects {
+ repositories {
+ jcenter()
+ mavenCentral()
+ }
}
+apply plugin: 'com.android.application'
+
repositories {
- mavenLocal()
+ jcenter()
mavenCentral()
+ maven {
+ url "http://jitsi.github.com/otr4j/repository/"
+ }
}
-nexus {
- attachSources = true
- attachTests = false
- attachJavadoc = true
- sign = true
+dependencies {
+ compile project(':libs/minidns')
+ compile project(':libs/openpgp-api-lib')
+ compile project(':libs/MemorizingTrustManager')
+ compile 'com.android.support:support-v13:19.1.0'
+ compile 'org.bouncycastle:bcprov-jdk15on:1.50'
+ compile 'net.java:otr4j:0.21'
+ compile fileTree(dir: 'libs', include: ['*.jar'])
}
-modifyPom {
- project {
- name 'minidns'
- description 'Minimal DNS library for java and android systems'
- url 'https://github.com/rtreffer/minidns'
- inceptionYear '2014'
+android {
+ compileSdkVersion 19
+ buildToolsVersion "19.1"
- scm {
- url 'https://github.com/rtreffer/minidns'
- connection 'scm:https://github.com/rtreffer/minidns'
- developerConnection 'scm:git://github.com/rtreffer/minidns.git'
- }
+ defaultConfig {
+ minSdkVersion 14
+ targetSdkVersion 19
+ versionCode 32
+ versionName "0.8-alpha"
+ }
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- distribution 'repo'
- }
- }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_7
+ targetCompatibility JavaVersion.VERSION_1_7
+ }
- developers {
- developer {
- id 'rtreffer'
- name 'Rene Treffer'
- email 'treffer@measite.de'
- }
- developer {
- id 'flow'
- name 'Florian Schmaus'
- email 'flow@geekplace.eu'
- }
- }
- }
-}
+ //
+ // To sign release builds, create the file `gradle.properties` in
+ // $HOME/.gradle or in your project directory with this content:
+ //
+ // mStoreFile=/path/to/key.store
+ // mStorePassword=xxx
+ // mKeyAlias=alias
+ // mKeyPassword=xxx
+ //
+ if (project.hasProperty('mStoreFile') &&
+ project.hasProperty('mStorePassword') &&
+ project.hasProperty('mKeyAlias') &&
+ project.hasProperty('mKeyPassword')) {
+ signingConfigs {
+ release {
+ storeFile file(mStoreFile)
+ storePassword mStorePassword
+ keyAlias mKeyAlias
+ keyPassword mKeyPassword
+ }
+ }
+ buildTypes.release.signingConfig = signingConfigs.release
+ } else {
+ buildTypes.release.signingConfig = null
+ }
-dependencies {
-} \ No newline at end of file
+ buildTypes {
+ release {
+ runProguard true
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+ }
+ applicationVariants.all { variant ->
+ def fileName = variant.packageApplication.outputFile.name.replace(".apk",
+ "-" + defaultConfig.versionName + ".apk")
+ variant.packageApplication.outputFile = new
+ File(variant.packageApplication.outputFile.parent, fileName)
+ if (variant.zipAlign) {
+ if (variant.name.equals('release')) {
+ variant.outputFile = new File(variant.outputFile.parent,
+ rootProject.name + "-" + defaultConfig.versionName + ".apk")
+ }
+ }
+ }
+ }
+
+ lintOptions {
+ disable 'MissingTranslation', 'InvalidPackage'
+ }
+
+ subprojects {
+
+ afterEvaluate {
+ if (getPlugins().hasPlugin('android') ||
+ getPlugins().hasPlugin('android-library')) {
+
+ configure(android.lintOptions) {
+ disable 'AndroidGradlePluginVersion', 'MissingTranslation'
+ }
+ }
+
+ }
+ }
+}