mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 22:55:46 +03:00
94 lines
2.7 KiB
Groovy
94 lines
2.7 KiB
Groovy
// Gradle build file
|
|
//
|
|
// This project was started in Eclipse and later moved to Android Studio. In the transition, both IDEs were supported.
|
|
// Due to this, the files layout is not the usual in new projects created with Android Studio / gradle. This file
|
|
// merges declarations usually split in two separates build.gradle file, one for global settings of the project in
|
|
// its root folder, another one for the app module in subfolder of root.
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:2.1.0'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
ext {
|
|
supportLibraryVersion = '23.1.1'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
flatDir {
|
|
dirs 'libs'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
/// dependencies for app building
|
|
compile name: 'touch-image-view'
|
|
compile project(':owncloud-android-library')
|
|
compile "com.android.support:support-v4:${supportLibraryVersion}"
|
|
compile "com.android.support:design:${supportLibraryVersion}"
|
|
compile 'com.jakewharton:disklrucache:2.0.2'
|
|
compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
|
compile 'com.getbase:floatingactionbutton:1.10.1'
|
|
|
|
/// dependencies for local unit tests
|
|
testCompile 'junit:junit:4.12'
|
|
testCompile 'org.mockito:mockito-core:1.10.19'
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 23
|
|
buildToolsVersion "23.0.3"
|
|
|
|
// adapt structure from Eclipse to Gradle/Android Studio expectations;
|
|
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
|
|
sourceSets {
|
|
main {
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
java.srcDirs = ['src']
|
|
resources.srcDirs = ['src']
|
|
aidl.srcDirs = ['src']
|
|
renderscript.srcDirs = ['src']
|
|
res.srcDirs = ['res']
|
|
assets.srcDirs = ['assets']
|
|
}
|
|
|
|
// move all the local unit tests structure as a whole from src/test/* to test/*
|
|
test.setRoot('test')
|
|
|
|
// Move the build types to build-types/<type>
|
|
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
|
|
// This moves them out of them default location under src/<type>/... which would
|
|
// conflict with src/ being used by the main source set.
|
|
// Adding new build types or product flavors should be accompanied
|
|
// by a similar customization.
|
|
debug.setRoot('build-types/debug')
|
|
release.setRoot('build-types/release')
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
targetCompatibility JavaVersion.VERSION_1_7
|
|
}
|
|
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
packagingOptions {
|
|
exclude 'META-INF/LICENSE.txt'
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|