74 lines
1.9 KiB
Groovy
74 lines
1.9 KiB
Groovy
/*
|
|
* Copyright 2014-2015 µg Project Team
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:1.0.0'
|
|
}
|
|
}
|
|
|
|
final boolean buildNlpAsLib = name.equals('UnifiedNlpLib')
|
|
|
|
if (buildNlpAsLib) {
|
|
apply plugin: 'com.android.library'
|
|
} else {
|
|
apply plugin: 'com.android.application'
|
|
}
|
|
|
|
dependencies {
|
|
compile 'com.android.support:support-v4:21.0.3'
|
|
compile 'com.android.support:appcompat-v7:21.0.3'
|
|
compile project(':UnifiedNlpApi')
|
|
provided project('compat')
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 21
|
|
buildToolsVersion "21.1.2"
|
|
lintOptions.abortOnError false
|
|
|
|
sourceSets {
|
|
main {
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
java.srcDirs = ['src']
|
|
aidl.srcDirs = ['src']
|
|
res.srcDirs = ['res']
|
|
}
|
|
}
|
|
|
|
if (!buildNlpAsLib) {
|
|
productFlavors {
|
|
NetworkLocation {
|
|
applicationId = 'com.google.android.gms'
|
|
minSdkVersion 19
|
|
}
|
|
LegacyNetworkLocation {
|
|
applicationId = 'com.google.android.location'
|
|
}
|
|
UnifiedNlp {
|
|
applicationId = 'org.microg.nlp'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (file('user.gradle').exists()) {
|
|
apply from: 'user.gradle'
|
|
}
|