build.gradle revision 7632e0ad04851ea5524a9f52504e7dcdbc00c514
1======= 2/* 3 * Copyright (C) 2013 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18apply plugin: 'java' 19 20configurations { 21 micro 22 nano 23} 24 25sourceSets { 26 micro { 27 java { 28 srcDirs = ['java/src/main/java/com/google/protobuf/micro'] 29 } 30 } 31 32 nano { 33 java { 34 srcDirs = ['java/src/main/java/com/google/protobuf/nano'] 35 } 36 } 37} 38 39jar { 40 from sourceSets.nano.output, sourceSets.micro.output 41 baseName "libprotobuf" 42 appendix "java" 43 version "2.3" 44 classifier "micronano" 45} 46 47task nanoJar(type: Jar) { 48 from sourceSets.nano.output 49 dependsOn nanoClasses 50 baseName "libprotobuf" 51 appendix "java" 52 version "2.3" 53 classifier "nano" 54} 55 56task microJar(type: Jar) { 57 from sourceSets.micro.output 58 dependsOn microClasses 59 baseName "libprotobuf" 60 appendix "java" 61 version "2.3" 62 classifier "micro" 63} 64 65artifacts { 66 micro microJar 67 nano nanoJar 68} 69 70