build.gradle revision 57faa14e5c5b678b38dcae1288f3e5eb34bd819f
1/*
2 * Copyright (C) 2013 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
17apply plugin: 'java'
18
19configurations {
20    micro
21    nano
22}
23
24sourceSets {
25    micro {
26        java {
27            srcDirs = ['java/src/main/java/com/google/protobuf/micro']
28        }
29    }
30
31    nano {
32        java {
33            srcDirs = ['java/src/main/java/com/google/protobuf/nano']
34        }
35    }
36}
37
38jar {
39    from sourceSets.nano.output, sourceSets.micro.output
40    baseName "libprotobuf"
41    appendix "java"
42    version "2.3"
43    classifier "micronano"
44}
45
46task nanoJar(type: Jar) {
47    from sourceSets.nano.output
48    dependsOn nanoClasses
49    baseName "libprotobuf"
50    appendix "java"
51    version "2.3"
52    classifier "nano"
53}
54
55task microJar(type: Jar) {
56    from sourceSets.micro.output
57    dependsOn microClasses
58    baseName "libprotobuf"
59    appendix "java"
60    version "2.3"
61    classifier "micro"
62}
63
64artifacts {
65    micro microJar
66    nano nanoJar
67}
68
69