-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
89 lines (74 loc) · 2.27 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
apply plugin: 'java'
apply plugin: 'java-library'
def versionMajor = 2
def versionMinor = 0
def versionPatch = 2
buildscript {
repositories {
mavenCentral()
}
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
implementation 'com.pholser:junit-quickcheck-core:1.0'
implementation 'com.pholser:junit-quickcheck-generators:1.0'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
artifacts {
archives javadocJar, sourcesJar
}
apply plugin: 'maven-publish'
publishing {
publications {
mavenJava(MavenPublication) {
groupId = "com.maximeroussy.invitrode"
artifactId = 'invitrode'
version = "${versionMajor}.${versionMinor}.${versionPatch}"
artifact javadocJar
artifact sourcesJar
from components.java
pom {
name = 'invitrode'
packaging = 'jar'
description = "A Java library to generate random english pronounceable words."
url = 'https://github.com/maximeroussy/invitrode'
scm {
connection = 'scm:git:git://github.com/maximeroussy/invitrode.git'
developerConnection = 'scm:git:ssh://github.com:maximeroussy/invitrode.git'
url = 'https://github.com/maximeroussy/invitrode/tree/master'
}
licenses {
license {
name = 'The MIT License'
url = 'https://opensource.org/licenses/MIT'
distribution = 'repo'
}
}
developers {
developer {
id = 'maximeroussy'
name = 'Maxime Roussy'
email = '[email protected]'
}
}
}
}
}
}
jar {
into("META-INF/maven/$project.group/$project.name") {
from { generatePomFileForMavenJavaPublication }
rename ".*", "pom.xml"
}
}