-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
124 lines (108 loc) · 3.67 KB
/
build.gradle
File metadata and controls
124 lines (108 loc) · 3.67 KB
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
123
124
plugins {
id 'java'
id 'jacoco'
id 'java-library'
id 'maven-publish'
id 'signing'
}
java {
withJavadocJar()
withSourcesJar()
}
compileJava {
sourceCompatibility = '8'
targetCompatibility = '8'
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
reports {
xml.required = false
csv.required = false
html.outputLocation = layout.buildDirectory.dir('reports/jacoco')
}
}
repositories {
mavenCentral()
}
group = 'io.github.ryucc'
version = '0.0.8'
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'ReRe'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'ReRe-' + version
description = 'A concise description of my library'
url = 'https://github.com/ryucc/ReRe'
licenses {
license {
name = 'The MIT License'
url = 'https://mit-license.org'
}
}
developers {
developer {
id = 'ryucc'
name = 'Kurtis Liu'
email = 'shortyliu@gmail.com'
}
}
scm {
connection = 'scm:git:git://github.com/ryucc/ReRe.git'
developerConnection = 'scm:git:ssh://github.com:ryucc/ReRe.git'
url = 'https://github.com/ryucc/ReRe/'
}
}
}
}
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
def releasesRepoUrl = layout.buildDirectory.dir('repos/releases')
def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots')
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
/*
signing {
useGpgCmd()
sign publishing.publications.mavenJava
}
*/
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
implementation group: 'org.mockito', name: 'mockito-core', version: '5.15.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.11.4'
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.11.4'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.27.3'
// https://mvnrepository.com/artifact/net.bytebuddy/byte-buddy-gradle-plugin
//runtimeOnly group: 'net.bytebuddy', name: 'byte-buddy-gradle-plugin', version: '1.17.0'
implementation 'net.bytebuddy:byte-buddy:1.17.1'
// https://mvnrepository.com/artifact/com.squareupup/javapoet
//implementation group: 'com.squareup.javapoet', name: 'javapoet', version: '0.5.0'
//Migrate to palantir, if java 11 version is availiable
implementation group: 'com.squareup', name: 'javapoet', version: '1.13.0'
testImplementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.14'
}
test {
useJUnitPlatform()
exclude('**/**IntegrationTests.java')
finalizedBy jacocoTestReport
}