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