-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
105 lines (90 loc) · 2.75 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
import java.nio.charset.StandardCharsets
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'signing'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
javadoc.options.encoding = StandardCharsets.UTF_8
compileJava.options.encoding = StandardCharsets.UTF_8
compileTestJava.options.encoding = StandardCharsets.UTF_8
group 'com.menecats'
version '1.0.1'
repositories {
mavenCentral()
}
dependencies {
}
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compileClasspath
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allJava
}
task packageJavadoc(type: Jar) {
classifier 'javadoc'
from javadoc
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/Menecats/polybool-java"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven {
name = "Sonatype"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
}
}
}
publications {
polybool(MavenPublication) {
version = version
groupId = group
artifactId = rootProject.name
from components.java
artifact sourcesJar
artifact packageJavadoc
pom {
name = 'Polybool Java'
description = 'Boolean operations on polygons (union, intersection, difference, xor).'
url = 'https://github.com/menecats/polybool-java'
licenses {
license {
name = 'MIT'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'menecats'
name = 'Davide Menegatti'
email = '[email protected]'
}
}
scm {
connection = 'scm:https://github.com/Menecats/polybool-java.git'
developerConnection = 'scm:git://github.com/Menecats/polybool-java.git'
url = 'https://github.com/menecats/polybool-java'
}
}
}
}
signing {
sign publishing.publications.polybool
}
}