aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
blob: 600a9660c16cc539d1674367cf505fa1decb0d27 (plain) (blame)
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
plugins {
    id 'java'
    id "org.javamodularity.moduleplugin" version "1.6.0"
}

group 'org.glavo'
version '0.2'

modularity.mixedJavaRelease 8

jar {
    manifest.attributes(
            'Implementation-Version': '1.2',
            'Main-Class': 'org.glavo.javah.Main',
            "GJavah-Version": project.version
    )
}

tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
}

compileTestJava {
    moduleOptions {
        addModules = [
                'org.junit.jupiter.api'
        ]
        addReads = [
                'org.glavo.javah': 'org.junit.jupiter.api'
        ]
    }
}

test {
    testLogging.showStandardStreams = true
    useJUnitPlatform()
    moduleOptions {
        runOnClasspath = true
    }
}

repositories {
    mavenCentral()
}

dependencies {
    // https://mvnrepository.com/artifact/commons-cli/commons-cli
    implementation group: 'info.picocli', name: 'picocli', version: '4.1.1'

    // https://mvnrepository.com/artifact/org.ow2.asm/asm
    implementation group: 'org.ow2.asm', name: 'asm', version: '7.2'

    testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.5.2'
}

task copyDependencies(type: Copy) {
    from configurations.default
    into 'build/libs'
}