File: build.gradle

package info (click to toggle)
svnkit 1.10.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 18,332 kB
  • sloc: java: 234,840; sh: 312; xml: 273; makefile: 26; python: 17; perl: 8
file content (70 lines) | stat: -rw-r--r-- 2,503 bytes parent folder | download
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
64
65
66
67
68
69
70
apply plugin: 'osgi'

configurations {
    embedOsgi
}

dependencies {
    compile project(path: ':svnkit')
    compile project(path: ':svnkit-javahl16')
    compile 'org.eclipse.core:runtime:3.2.0-v20060603'

    embedOsgi project(path: ':svnkit', transitive: false, configuration: 'jar_archive')
    embedOsgi project(path: ':svnkit-javahl16', transitive: false, configuration: 'jar_archive')
    embedOsgi 'de.regnis.q.sequence:sequence-library:1.0.3'
    embedOsgi 'com.jcraft:jsch.agentproxy.connector-factory:0.0.7'
    embedOsgi 'org.lz4:lz4-java:1.4.1'
    embedOsgi('com.jcraft:jsch.agentproxy.svnkit-trilead-ssh2:0.0.7'){
       transitive = false
    }
}

classes << {
    configurations.embedOsgi.files.each {
        f ->
        if (f.name.endsWith('.jar') || f.name.endsWith('.zip')) {
        copy {
            into 'build/classes/main'
            from zipTree(f)
            exclude 'META-INF/**'
        }
        }
    }
}

jar {
    ext {
        bundleName = rootProject.group
        bundleSymbolicName = 'SVNKit pure Java Subversion Library'
        if (rootProject.release && rootProject.buildNumber.startsWith("snapshot")) {
            bundleVersion = rootProject.version.replace('-snapshot', '.snapshot').replace('-', '.')
        } else {
            bundleVersion = rootProject.version.replace('-SNAPSHOT', '.SNAPSHOT').replace('-', '.') + (rootProject.release ? '.' : '_') + buildNumber
        }
        bundleVendor = 'TMate Software'

        println "OSGi version: ${bundleVersion}"
    }

    baseName = bundleName
    manifest {
        attributes (
        'Bundle-SymbolicName': bundleName,
        'Bundle-Version': bundleVersion,
        'Bundle-Vendor': bundleVendor,
        'Bundle-Name': bundleSymbolicName,
        'Bundle-RequiredExecutionEnvironment' : 'JavaSE-' + targetCompatibility,
        'Bundle-Activator' : 'org.tmatesoft.svn.core.SVNKitActivator',
        'Bundle-ActivationPolicy' : 'lazy',
        'Build-Version' : rootProject.version,
        'Build-Number' : rootProject.buildNumber,
        'Eclipse-BundleShape' : 'jar',
        'Require-Bundle': 'net.java.dev.jna;bundle-version="[3.2.7,4.1.0]";resolution:=optional,' +
            'com.trilead.ssh2;bundle-version="[1.0.0,2.0.0)",' +        
			'org.tmatesoft.sqljet;bundle-version="[1.0.5,2.0.0)",' +
			'org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)"')

        instruction ('Export-Package','*;version=' + bundleVersion)
        instruction ('Import-Package', '!*')
    }
}