build.gradle revision e61d1cc710803cdf0ab4f2aca3d18c46949758a9
1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16apply plugin: 'java'
17apply plugin: 'kotlin'
18
19sourceCompatibility = dataBindingConfig.javaTargetCompatibility
20targetCompatibility = dataBindingConfig.javaSourceCompatibility
21
22sourceSets {
23    main.java.srcDirs += 'src/main/kotlin'
24}
25
26buildscript {
27    // to make IJ happy
28    ext.kotlin_version = dataBindingConfig.kotlinVersion
29    dependencies {
30        classpath 'commons-io:commons-io:2.4'
31        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
32    }
33}
34
35dependencies {
36    compile project(':dataBinding:compilerCommon')
37    compile project(':dataBinding:baseLibrary')
38    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
39    compile 'org.apache.commons:commons-lang3:3.3.2'
40    compile 'commons-io:commons-io:2.4'
41    compile 'commons-codec:commons-codec:1.10'
42    compile 'com.tunnelvisionlabs:antlr4:4.5'
43    compile 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3'
44    testCompile 'junit:junit:4.12'
45}
46
47uploadArchives {
48    repositories {
49        mavenDeployer {
50            pom.artifactId = 'compiler'
51            pom.project {
52                licenses {
53                    license {
54                        name dataBindingConfig.licenseName
55                        url dataBindingConfig.licenseUrl
56                        distribution dataBindingConfig.licenseDistribution
57                    }
58                }
59            }
60        }
61    }
62}
63
64
65
66project.ext.pomName = 'Data Binding Annotation Processor'
67project.ext.pomDesc = 'The annotation processor for Data Binding. Generates binding classes for runtime.'
68enablePublishing(this, true)
69fullJar(project)
70test.enabled = !System.getProperty("java.version").startsWith("1.6")
71