File: build.gradle

package info (click to toggle)
svnkit 1.8.14-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 17,904 kB
  • sloc: java: 230,905; xml: 273; sh: 262; makefile: 36; python: 17; perl: 8
file content (61 lines) | stat: -rw-r--r-- 1,865 bytes parent folder | download | duplicates (2)
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
project.ext.packageName = 'org.tmatesoft.svn.cli'
project.ext.scripts = ['jsvn' : "${packageName}.SVN",  
           'jsvnadmin' : "${packageName}.SVNAdmin", 
           'jsvndumpfilter' : "${packageName}.SVNDumpFilter", 
           'jsvnlook' : "${packageName}.SVNLook", 
           'jsvnsync' : "${packageName}.SVNSync", 
           'jsvnversion' : "${packageName}.SVNVersion"]

import org.apache.tools.ant.filters.*;
 
jar << {
    
    File scriptsDir = file('build/scripts')
    scriptsDir.mkdirs()
    
    def classpath = []
    configurations.compile.files.each {
        classpath += build_jar_name(it)
    }
    classpath += jar.archiveName
    project.ext.script_classpath = classpath
    
    scripts.keySet().each { scriptName ->
        def mainclassName = scripts[scriptName]
        copy {
            from file("src/main/scripts/jsvn")
            into scriptsDir

            expand(project: project, classpath_property: 'script_classpath', mainclass : mainclassName)
            filter(FixCrLfFilter.class, eol:FixCrLfFilter.CrLf.newInstance("lf"))
            fileMode 0755

            eachFile {
                it.name = scriptName
            }
        }
        copy {
            from file("src/main/scripts/jsvn.bat")
            into scriptsDir

            expand(project: project, classpath_property: 'script_classpath', mainclass : mainclassName)
            filter(FixCrLfFilter.class, eol:FixCrLfFilter.CrLf.newInstance("crlf"))

            eachFile {
                it.name = scriptName + '.bat'
            }
        }
    }
    
    copy {
        from file("src/main/scripts/jsvnsetup.openvms")
        into scriptsDir
        filter {
            expand(project: project, classpath_property: 'script_classpath')
        }
    }
    copy {
        from file("src/main/conf/logging.properties")
        into scriptsDir
    }
}