build.gradle 4.72 KB
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
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
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements. See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

plugins {
    id 'maven-publish'
    id 'java-library'
    id 'org.jetbrains.kotlin.jvm' version '1.3.71'
    id 'org.jetbrains.dokka' version '0.10.1'
    id 'com.gitlab.morality.grit' version '2.0.2'
    id 'org.jlleitschuh.gradle.ktlint' version '9.2.1'
}

group = 'ch.memobase'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
    jcenter()
    maven {
Jonas Waeber's avatar
Jonas Waeber committed
35
        url "https://dl.bintray.com/memoriav/memobase"
Jonas Waeber's avatar
Jonas Waeber committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
    }
}


ext {
    kafkaV = '2.3.1'
    log4jV = '2.11.2'
}

dependencies {
    // https://mvnrepository.com/artifact/org.elasticsearch.client/elasticsearch-rest-high-level-client
    //compile group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client', version: '7.1.0'
    implementation "org.apache.logging.log4j:log4j-api:${log4jV}"

Jonas Waeber's avatar
Jonas Waeber committed
50
    implementation 'org.memobase:memobase-service-utilities:2.0.15'
Jonas Waeber's avatar
Jonas Waeber committed
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
    // YAML Parser
    implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.+'
    implementation 'com.fasterxml.jackson.core:jackson-core:2.11.+'
    implementation 'com.fasterxml.jackson.core:jackson-annotations:2.11.+'
    implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.11.+"
    implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.+'
    // RDF
    implementation 'org.apache.jena:apache-jena:3.14.0'
    // JSON Parser
    implementation 'com.beust:klaxon:5.4'
    // CSV Reader
    implementation("com.github.doyaaaaaken:kotlin-csv-jvm:0.7.3")

    // KOTLIN IMPORTS
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
    implementation "org.jetbrains.kotlin:kotlin-script-runtime:1.3.71"
    implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.71"

    // TESTING
    testImplementation("org.junit.jupiter:junit-jupiter:5.4.2")
    testImplementation 'org.assertj:assertj-core:3.15.0'
    testImplementation "org.apache.logging.log4j:log4j-core:${log4jV}"

}

Jonas Waeber's avatar
Jonas Waeber committed
76
77
78
79
80
81
82

sourceSets {
    main.kotlin.srcDirs += 'src/main/kotlin'
    test.kotlin.srcDirs += 'src/test/kotlin'
    test.resources.srcDirs += 'src/test/resources'
}

Jonas Waeber's avatar
Jonas Waeber committed
83
84
85
86
87
88
89
90
91
92
93
94
95
96
task sourceJar(type: Jar) {
    from sourceSets.main.allSource
    classifier "sources"
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

publishing {
    publications {
Jonas Waeber's avatar
Jonas Waeber committed
97
        library(MavenPublication) {
Jonas Waeber's avatar
Jonas Waeber committed
98
99
            from components.java
            pom {
Jonas Waeber's avatar
Jonas Waeber committed
100
101
                name = 'Normalization Service Configuration'
                description = "This library contains the parsers and validators for the normalization service configurations."
Jonas Waeber's avatar
Jonas Waeber committed
102
                url = "https://gitlab.switch.ch/memoriav/memobase-2020/libraries/package-registry"
Jonas Waeber's avatar
Jonas Waeber committed
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
                licenses {
                    license {
                        name = 'The Apache License, Version 2.0'
                        url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    }
                }
                developers {
                    developer {
                        id = 'jonas.waeber'
                        name = 'Jonas Waeber'
                        email = 'jonas.waeber@unibas.ch'
                    }
                }
                scm {
                    connection = 'scm:git:https://gitlab.switch.ch/memoriav/memobase-2020/libraries/normalizer-service-configuration.git'
                    developerConnection = 'scm:git:git@gitlab.switch.ch:memoriav/memobase-2020/libraries/normalizer-service-configuration.git'
                    url = 'https://gitlab.switch.ch/memoriav/memobase-2020/libraries/normalizer-service-configuration'
                }
            }

        }
    }
Jonas Waeber's avatar
Jonas Waeber committed
125
126
127

    repositories {
        maven {
Jonas Waeber's avatar
Jonas Waeber committed
128
            url "https://gitlab.switch.ch/api/v4/projects/package-registry/packages/maven"
Jonas Waeber's avatar
Jonas Waeber committed
129
130
            name "GitLab"
            credentials(HttpHeaderCredentials) {
Jonas Waeber's avatar
Jonas Waeber committed
131
132
                name "Private-Token"
                value "xWB1w947_6DV19xnHSwg"
Jonas Waeber's avatar
Jonas Waeber committed
133
134
135
136
137
138
            }
            authentication {
                header(HttpHeaderAuthentication)
            }
        }
    }
Jonas Waeber's avatar
Jonas Waeber committed
139

Jonas Waeber's avatar
Jonas Waeber committed
140
}