Justin Morey | f6a99b5 | 2014-03-05 13:06:37 -0600 | [diff] [blame] | 1 | apply plugin: 'java' |
| 2 | |
Jon Boekenoogen | 46ea63c | 2014-09-28 14:10:26 -0700 | [diff] [blame] | 3 | configurations { |
| 4 | // similar to 'default', export compile-time dependencies |
| 5 | host.extendsFrom(hostCompile) |
| 6 | target.extendsFrom(targetCompile) |
| 7 | } |
| 8 | |
Justin Morey | f6a99b5 | 2014-03-05 13:06:37 -0600 | [diff] [blame] | 9 | sourceSets { |
Jon Boekenoogen | 46ea63c | 2014-09-28 14:10:26 -0700 | [diff] [blame] | 10 | host { |
| 11 | java { |
| 12 | srcDirs = ['src', 'cglib-and-asm/src'] |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | target { |
Justin Morey | f6a99b5 | 2014-03-05 13:06:37 -0600 | [diff] [blame] | 17 | java { |
| 18 | srcDirs = ['src'] |
Jon Boekenoogen | 674060f | 2014-06-02 18:56:43 -0700 | [diff] [blame] | 19 | exclude 'org/mockito/internal/creation/cglib/**', |
| 20 | 'org/mockito/internal/creation/jmock/**', |
| 21 | 'org/mockito/internal/creation/AbstractMockitoMethodProxy.java', |
| 22 | 'org/mockito/internal/creation/AcrossJVMSerializationFeature.java', |
| 23 | 'org/mockito/internal/creation/CglibMockMaker.java', |
| 24 | 'org/mockito/internal/creation/DelegatingMockitoMethodProxy.java', |
| 25 | 'org/mockito/internal/creation/MethodInterceptorFilter.java', |
| 26 | 'org/mockito/internal/creation/MockitoMethodProxy.java', |
| 27 | 'org/mockito/internal/creation/SerializableMockitoMethodProxy.java', |
| 28 | 'org/mockito/internal/invocation/realmethod/FilteredCGLIBProxyRealMethod.java', |
| 29 | 'org/mockito/internal/invocation/realmethod/CGLIBProxyRealMethod.java', |
| 30 | 'org/mockito/internal/invocation/realmethod/HasCGLIBMethodProxy.java' |
Justin Morey | f6a99b5 | 2014-03-05 13:06:37 -0600 | [diff] [blame] | 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
Jon Boekenoogen | 46ea63c | 2014-09-28 14:10:26 -0700 | [diff] [blame] | 35 | dependencies { |
| 36 | targetCompile project(':hamcrest') |
| 37 | targetCompile project(':objenesis') |
| 38 | targetCompile project(path: ':junit', configuration: 'target') |
| 39 | |
| 40 | hostCompile project(':hamcrest') |
| 41 | hostCompile project(':objenesis') |
| 42 | hostCompile project(path: ':junit', configuration: 'host') |
| 43 | hostCompile 'org.apache.ant:ant:1.8.0' |
Justin Morey | f6a99b5 | 2014-03-05 13:06:37 -0600 | [diff] [blame] | 44 | } |
| 45 | |
Jon Boekenoogen | 46ea63c | 2014-09-28 14:10:26 -0700 | [diff] [blame] | 46 | task targetJar(type: Jar) { |
| 47 | from sourceSets.target.output |
| 48 | dependsOn targetClasses |
| 49 | baseName "mockito" |
| 50 | classifier "target" |
| 51 | } |
| 52 | |
| 53 | task hostJar(type: Jar) { |
| 54 | from sourceSets.host.output |
| 55 | dependsOn hostClasses |
| 56 | baseName "mockito" |
| 57 | classifier "host" |
| 58 | } |
| 59 | |
| 60 | artifacts { |
| 61 | host hostJar |
| 62 | target targetJar |
Justin Morey | f6a99b5 | 2014-03-05 13:06:37 -0600 | [diff] [blame] | 63 | } |