-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
93 lines (82 loc) · 2.49 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
plugins {
id 'maven-publish'
id 'java'
id 'java-library'
}
group 'dev.organisationsnummer'
version = System.getenv("RELEASE_VERSION") ?: 'NONE'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.2', 'org.junit.jupiter:junit-jupiter-params:5.11.2', 'org.json:json:20240303'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.2'
implementation 'dev.personnummer:personnummer:3.5.0'
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version)
}
}
java {
withJavadocJar()
withSourcesJar()
}
artifacts {
archives javadocJar, sourcesJar, jar
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
// Release
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/organisationsnummer/java")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
mavenJava (MavenPublication) {
version = System.getenv("RELEASE_VERSION")
groupId = 'dev.organisationsnummer'
from components.java
pom {
name = 'Organisationsnummer'
description = 'Organisationsnummer is a small open-source project created to validate, format and getting the organization type from swedish organization numbers.'
url = 'https://organisationsnummer.dev'
licenses {
license {
name = 'MIT'
url = 'https://mit-license.org/'
}
}
developers {
developer {
id = 'jite'
name = 'Johannes Tegnér'
email = 'johannes@jitesoft.com'
}
}
scm {
connection = 'scm:git:git@github.com:organisationsnummer/java.git'
url = 'https://github.com/organisationsnummer/java'
}
}
}
}
}