File: build.gradle

package info (click to toggle)
fontawesomefx 9.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,908 kB
  • sloc: java: 8,049; xml: 338; sh: 128; makefile: 2
file content (108 lines) | stat: -rw-r--r-- 2,476 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
apply plugin: 'base'
apply from: 'deploy.gradle'

buildscript {
    repositories {
        jcenter()
    }
}

// Create the pom configuration:
def pomConfig = {
    licenses {
        license {
            name "The Apache Software License, Version 2.0"
            url "http://www.apache.org/licenses/LICENSE-2.0.txt"
            distribution "repo"
        }
    }
    developers {
        developer {
            id "developer-id"
            name "developer-name"
            email "dev@d.com"
        }
    }

    scm {
        url "https://github.com/yourgithubaccount/example"
    }
}

subprojects {
    apply plugin: "java"

    group = artifactGroupId
    sourceCompatibility = '1.9'
    [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

    repositories {
        mavenCentral()
        mavenLocal()
        flatDir {
            dirs '/usr/share/java/'
        }
    }

    task javadocJar(type: Jar) {
        classifier 'javadoc'
        from javadoc.destinationDir
    }

    task sourceJar(type: Jar) {
        from sourceSets.main.allJava
        classifier "sources"
    }

    dependencies {
        testCompile 'junit:junit:4.10'
        compile name: 'javafx-base'
        compile name: 'javafx-swing'
        compile name: 'javafx-web'
        compile name: 'javafx-graphics'
        compile name: 'javafx-controls'
        compile name: 'javafx-fxml'
    }

    afterEvaluate {
        repositories {
            jcenter()
        }

        compileJava {
            doFirst {
                options.compilerArgs = [
                        '--module-path', classpath.asPath,
                ]
                classpath = files()
            }
        }

        test {
            inputs.property("moduleName", moduleName)
            doFirst {
                jvmArgs = [
                        '--module-path', classpath.asPath,
                        '--add-modules', 'ALL-MODULE-PATH',
                        '--add-reads', "$moduleName=junit",
                        '--patch-module', "$moduleName=" + files(sourceSets.test.java.outputDir).asPath,
                ]
                classpath = files()
            }
        }

        jar {
            inputs.property("moduleName", moduleName)
            manifest {
                attributes('Main-Class': mainClassName)
                attributes('Automatic-Module-Name': moduleName)
            }
        }

    }

}

task wrapper(type: Wrapper) {
    gradleVersion = '4.2'
}