1+ plugins {
2+ id ' java-library'
3+ id ' maven-publish'
4+
5+ }
6+ compileJava {
7+ options. encoding = " UTF-8"
8+ }
9+ compileTestJava {options. encoding = " UTF-8" }
10+
11+
12+ group = ' io.github.mohammadrezaeicode'
13+ version = ' 0.1-SNAPSHOT'
14+
15+ java {
16+ withJavadocJar()
17+ withSourcesJar()
18+ }
19+
20+ repositories {
21+ mavenCentral()
22+ }
23+
24+ dependencies {
25+ testImplementation platform(' org.junit:junit-bom:5.9.1' )
26+ testImplementation ' org.junit.jupiter:junit-jupiter'
27+ testImplementation ' org.junit.jupiter:junit-jupiter:5.8.1'
28+ testImplementation ' org.junit.jupiter:junit-jupiter:5.8.1'
29+ compileOnly ' org.projectlombok:lombok:1.18.36'
30+ annotationProcessor ' org.projectlombok:lombok:1.18.36'
31+ }
32+
33+ publishing {
34+ publications {
35+ gpr(MavenPublication ) {
36+ artifactId = " excel"
37+ from components. java
38+ versionMapping {
39+ usage(' java-api' ) {
40+ fromResolutionOf(' runtimeClasspath' )
41+ }
42+ usage(' java-runtime' ) {
43+ fromResolutionResult()
44+ }
45+ }
46+ pom {
47+ name = ' MR Excel'
48+ description = ' A versatile Java library for effortlessly generating .xlsx files from input objects. Seamlessly create Excel spreadsheets with data, formatting, formulas, and more.'
49+ url = ' https://github.com/mohammadrezaeicode/mr-excel-java'
50+ // properties = [
51+ // myProp: "value",
52+ // "prop.with.dots": "anotherValue"
53+ // ]
54+ licenses {
55+ license {
56+ name = ' The Apache License, Version 2.0'
57+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
58+ }
59+ }
60+ developers {
61+ developer {
62+ id = ' MohammadR'
63+ name = ' Mohammad Rezaei'
64+ 65+ }
66+ }
67+ scm {
68+ connection = ' scm:git:https://github.com/mohammadrezaeicode/mr-excel-java.git'
69+ developerConnection
= ' scm:git:[email protected] :mohammadrezaeicode/mr-excel-java.git' 70+ url = ' https://github.com/mohammadrezaeicode/mr-excel-java'
71+ }
72+ repositories {
73+ maven {
74+ name = " GitHubPackages"
75+ url = uri(" https://maven.pkg.github.com/mohammadrezaeicode/mr-excel-java" ) // replace OWNER and REPOSITORY with your GitHub username and your repository name
76+ credentials {
77+ username = project. findProperty(" gpr.user" ) ?: System . getenv(" USERNAME" )
78+ password = project. findProperty(" gpr.key" ) ?: System . getenv(" TOKEN" )
79+ }
80+ }
81+ }
82+ }
83+ }
84+ }
85+ }
86+
87+ test {
88+ useJUnitPlatform()
89+ }
90+ tasks. withType(JavaCompile ) {
91+ options. encoding = ' UTF-8'
92+ }
93+ javadoc {
94+ if (JavaVersion . current(). isJava9Compatible()) {
95+ options. addBooleanOption(' html5' , true )
96+ }
97+ }
0 commit comments