-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
122 lines (108 loc) · 3.17 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("com.bmuschko:gradle-nexus-plugin:2.3.1")
}
}
plugins {
id 'java'
id("maven")
id("signing")
}
/**
* Set the java version. Version 8 and upwards should worked. Has been tested with Java 8 and 11
*/
def javaVersion = JavaVersion.VERSION_11
if (hasProperty('javaVersion')) {
javaVersion = JavaVersion.toVersion(getProperty('javaVersion') as String)
println "Building with Java Version=" + javaVersion
}
apply plugin: "com.bmuschko.nexus"
java {
modularity.inferModulePath = javaVersion >= JavaVersion.VERSION_1_9
}
compileJava {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (javaVersion < JavaVersion.VERSION_1_9) {
excludes += ['**/module-info.java']
}
}
test {
useJUnitPlatform()
}
repositories {
mavenCentral()
}
version "0.9.61"
group "net.mahdilamb"
ext.moduleName = 'net.mahdilamb.colormap'
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}
task swingDemo(type: JavaExec, dependsOn: ["testClasses"]) {
classpath = sourceSets["test"].runtimeClasspath
main = "net.mahdilamb.colormap.tests.InteractiveTest"
}
/**
* Uncomment and run to insert colormap swatches into README.md
*/
task generateReadme(type: JavaExec, dependsOn: ["testClasses"]) {
classpath = sourceSets["test"].runtimeClasspath
main = "net.mahdilamb.colormap.reflect.GenerateReadme"
}
/**
* Uncomment and run to insert colors
*/
task insertColors(type: JavaExec, dependsOn: ["testClasses"]) {
classpath = sourceSets["test"].runtimeClasspath
main = "net.mahdilamb.colormap.reflect.InsertColors"
}
/**
* Uncomment and run to insert annotated colormaps into net.mahdilamb.colormap.Colormap
*/
/*
task insertColormaps(type: JavaExec, dependsOn: ["testClasses"]) {
classpath = sourceSets["test"].runtimeClasspath
main = "net.mahdilamb.colormap.reflect.InsertColormaps"
}*/
modifyPom {
project {
name = "Colormap"
description = "A Java-based colormap generator."
url = "https://github.com/mahdilamb/colormap"
inceptionYear = "2020"
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 = "mahdilamb"
name = "Mahdi Lamb"
email = "mahdilamb[at]gmail[dot]com"
}
}
scm {
url = "https://github.com/mahdilamb/colormap"
connection = "scm:https://mahdilamb@github.com/mahdilamb/colormap.git"
developerConnection = "scm:git://github.com/mahdilamb/colormap.git"
}
}
}
extraArchive {
sources = true
tests = true
javadoc = true
}
nexus {
sign = !version.endsWith("SNAPSHOT")
repositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
snapshotRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
}