-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
107 lines (93 loc) · 3.08 KB
/
build.gradle
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
plugins {
id 'java'
id 'java-library'
id 'signing'
id 'maven-publish'
id('io.github.gradle-nexus.publish-plugin') version '1.3.0'
id "com.github.ben-manes.versions" version "0.48.0"
}
group = 'se.alipsa.tablesaw'
version = '1.0.0-SNAPSHOT'
description = 'A Tablesaw extension providing a higher level of abstraction compared to jsplot and enables a chart to be rendered in various formats'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
withSourcesJar()
withJavadocJar()
}
repositories {
if (version.contains('SNAPSHOT')) {
// Slows down the build (a lot), use only if local SNAPSHOTS are needed
mavenLocal()
}
mavenCentral()
}
dependencies {
def tablesawVersion = "0.43.1"
def jfxVersion = "20.0.2"
def log4jVersion = "2.20.0"
org.gradle.internal.os.OperatingSystem os = org.gradle.internal.os.OperatingSystem.current()
def qualifier = 'unknown'
if (os.isLinux()) {
qualifier='linux'
} else if (os.isWindows()) {
qualifier = 'win'
} else if (os.isMacOsX()) {
qualifier = 'mac-aarch64'
}
implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}"
implementation "tech.tablesaw:tablesaw-core:${tablesawVersion}"
implementation "tech.tablesaw:tablesaw-jsplot:${tablesawVersion}"
compileOnly "org.openjfx:javafx-controls:${jfxVersion}:$qualifier"
testImplementation "org.openjfx:javafx-controls:${jfxVersion}:$qualifier"
}
test {
testLogging.showStandardStreams = true
// run using gradle -Pheadless=true test
jvmArgs "-Dheadless=${project.hasProperty('headless') ? project.headless : false}"
useJUnitPlatform()
}
//Maven Central uploads
nexusPublishing {
repositories {
sonatype()
}
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
name = 'Tablesaw charts'
description = "${project.description}"
url = "https://github.com/Alipsa/tablesaw-charts"
licenses {
license {
name = 'MIT License'
url = 'https://raw.githubusercontent.com/Alipsa/tablesaw-charts/master/LICENSE'
}
}
developers {
developer {
id = 'perNyfelt'
name = 'Per Nyfelt'
}
}
scm {
url = 'https://github.com/Alipsa/tablesaw-charts/tree/master'
connection = 'scm:git:https://github.com/Alipsa/tablesaw-charts.git'
developerConnection = 'scm:git:https://github.com/Alipsa/tablesaw-charts.git'
}
}
}
}
}
signing {
if (project.properties['signing.keyId'] != null) {
project.logger.lifecycle("Signing artifacts...")
sign publishing.publications.maven
} else {
project.logger.lifecycle("signing.keyId is not defined, skipping signing of artifacts...")
}
}