-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
152 lines (140 loc) · 4.49 KB
/
build.gradle
File metadata and controls
152 lines (140 loc) · 4.49 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
compileJava {
options.encoding = "UTF-8"
}
compileTestJava {options.encoding = "UTF-8"}
group = 'io.github.mohammadrezaeicode'
version = '1.0.1'
java {
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
compileOnly 'org.projectlombok:lombok:1.18.36'
annotationProcessor 'org.projectlombok:lombok:1.18.36'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "excel"
group = 'io.github.mohammadrezaeicode'
version = '1.0.1'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'MR Excel'
description = 'A versatile Java library for effortlessly generating .xlsx files from input objects. Seamlessly create Excel spreadsheets with data, formatting, formulas, and more.'
url = 'https://github.com/mohammadrezaeicode/mr-excel-java'
// properties = [
// myProp: "value",
// "prop.with.dots": "anotherValue"
// ]
licenses {
license {
name = 'The MIT License'
url = 'https://github.com/mohammadrezaeicode/mr-excel-repo/blob/main/LICENSE'
}
}
developers {
developer {
id = 'MohammadR'
name = 'Mohammad Rezaei'
email = 'mohammadrezaeicode@gmail.com'
}
}
scm {
connection = 'scm:git:https://github.com/mohammadrezaeicode/mr-excel-java.git'
developerConnection = 'scm:git:git@github.com:mohammadrezaeicode/mr-excel-java.git'
url = 'https://github.com/mohammadrezaeicode/mr-excel-java'
}
repositories {
maven {
// url = version.endsWith('SNAPSHOT') ?
// "https://central.sonatype/content/repositories/snapshots/" :
// "https://central.sonatype/service/local/staging/deploy/maven2/"
//
// credentials {
// username = project.findProperty("ossrhUsername") // Load from gradle.properties
// password = project.findProperty("ossrhPassword") // Load from gradle.properties
// }
def releasesRepoUrl = layout.buildDirectory.dir('repos/releases')
def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots')
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
}
}
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
//task javadocJar(type: Jar) {
// classifier = 'javadoc'
// from javadoc
//}
//
//task sourcesJar(type: Jar) {
// classifier = 'sources'
// from sourceSets.main.allSource
//}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
withJavadocJar()
withSourcesJar()
}
//javadoc {
//
//}
signing {
sign publishing.publications.mavenJava
}
//
//
//javadoc {
// if(JavaVersion.current().isJava9Compatible()) {
// options.addBooleanOption('html5', true)
// exclude()
// }
// options {
// addStringOption('Xdoclint:none', '') // Disable doclint warnings
//
// }
// exclude('**/lombok/**')
//}
javadoc {
// options.addFileOption './src'
options.encoding = 'UTF-8'
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
exclude()
}
// source = sourceSets.main.allJava
// options {
// addStringOption('Xdoclint', 'none') // Disable doclint warnings
// excludes = ['**/lombok/**'] // Exclude Lombok classes
// }
}