Home | History | Annotate | Download | only in baseLibrary
      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  */
     16 
     17 apply plugin: 'java'
     18 
     19 sourceCompatibility = dataBindingConfig.javaTargetCompatibility
     20 targetCompatibility = dataBindingConfig.javaSourceCompatibility
     21 
     22 sourceSets {
     23     main {
     24         java {
     25             srcDir 'src/main/java'
     26         }
     27     }
     28     test {
     29         java {
     30             srcDir 'src/test/java'
     31         }
     32     }
     33 }
     34 
     35 dependencies {
     36     testCompile 'junit:junit:4.12'
     37 }
     38 
     39 uploadArchives {
     40     repositories {
     41         mavenDeployer {
     42             pom.artifactId = 'baseLibrary'
     43             pom.project {
     44                 licenses {
     45                     license {
     46                         name dataBindingConfig.licenseName
     47                         url dataBindingConfig.licenseUrl
     48                         distribution dataBindingConfig.licenseDistribution
     49                     }
     50                 }
     51             }
     52         }
     53     }
     54 }
     55 
     56 task prebuildJar(type : Copy) {
     57     dependsOn uploadArchives
     58     from "$buildDir/libs/baseLibrary-${version}.jar"
     59     into dataBindingConfig.prebuildFolder
     60     rename { String fileName ->
     61         "databinding-baseLibrary.jar"
     62     }
     63 }
     64 
     65 project.ext.pomName = 'Data Binding Base Library'
     66 project.ext.pomDesc = 'Shared library between Data Binding runtime lib and compiler'
     67 enablePublishing(this, true)