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" 18apply plugin: 'com.android.databinding.bintray' 19 20 21sourceCompatibility = config.javaTargetCompatibility 22targetCompatibility = config.javaSourceCompatibility 23 24buildscript { 25 dependencies { 26 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${config.kotlinVersion}" 27 classpath 'commons-io:commons-io:2.4' 28 } 29} 30 31dependencies { 32 compile project(":compilerCommon") 33 compile project(':baseLibrary') 34 compile 'org.apache.commons:commons-lang3:3.3.2' 35 compile 'commons-io:commons-io:2.4' 36 compile 'commons-codec:commons-codec:1.10' 37 compile "org.jetbrains.kotlin:kotlin-stdlib:${config.kotlinVersion}" 38 39 compile 'com.tunnelvisionlabs:antlr4:4.5' 40 testCompile files('../baseLibrary/src/main/java') 41 testCompile files('../library/src/main/java') 42 testCompile 'junit:junit:4.12' 43} 44 45uploadArchives { 46 repositories { 47 mavenDeployer { 48 pom.artifactId = 'compiler' 49 pom.project { 50 licenses { 51 license { 52 name config.licenseName 53 url config.licenseUrl 54 distribution config.licenseDistribution 55 } 56 } 57 } 58 } 59 } 60} 61 62project(':library').afterEvaluate { libProject -> 63 tasks['compileTestKotlin'].dependsOn libProject.tasks['uploadJarArchives'] 64} 65 66task fatJar(type: Jar) { 67 baseName = project.name + '-all' 68 doFirst { 69 tasks.findByName("buildLicenseNoticeFor${project.name.capitalize()}").execute() 70 } 71 from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } 72 from new File(project.buildDir,'NOTICE.txt') 73 archiveName "databinding-studio-bundle.jar" 74 destinationDir = new File(config.prebuildFolder) 75 with jar 76} 77 78task prebuild() { 79 dependsOn fatJar 80} 81 82