Skip to content

Commit 6fd9e08

Browse files
author
m.r
committed
init 0.1
0 parents  commit 6fd9e08

File tree

76 files changed

+7002
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+7002
-0
lines changed

.github/workflows/build.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Manually package
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
branch:
6+
description: 'Test Branch'
7+
required: true
8+
default: 'main'
9+
jobs:
10+
test:
11+
name: Deploy package
12+
timeout-minutes: 30
13+
continue-on-error: true
14+
runs-on: 'ubuntu-latest'
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
ref: ${{github.event.inputs.branch}}
19+
- uses: actions/setup-java@v4
20+
with:
21+
java-version: '17'
22+
distribution: 'temurin'
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
26+
27+
- name: Build with Gradle
28+
run: ./gradlew build
29+
30+
- name: Upload build artifacts
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: Package
34+
path: build/libs

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
.idea/*
9+
.idea/modules.xml
10+
.idea/jarRepositories.xml
11+
.idea/compiler.xml
12+
.idea/libraries/
13+
*.iws
14+
*.iml
15+
*.ipr
16+
out/
17+
!**/src/main/**/out/
18+
!**/src/test/**/out/
19+
20+
### Eclipse ###
21+
.apt_generated
22+
.classpath
23+
.factorypath
24+
.project
25+
.settings
26+
.springBeans
27+
.sts4-cache
28+
bin/
29+
!**/src/main/**/bin/
30+
!**/src/test/**/bin/
31+
32+
### NetBeans ###
33+
/nbproject/private/
34+
/nbbuild/
35+
/dist/
36+
/nbdist/
37+
/.nb-gradle/
38+
39+
### VS Code ###
40+
.vscode/
41+
42+
### Mac OS ###
43+
.DS_Store

build.gradle

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
plugins {
2+
id 'java-library'
3+
id 'maven-publish'
4+
id 'signing'
5+
6+
}
7+
compileJava {
8+
options.encoding = "UTF-8"
9+
}
10+
compileTestJava {options.encoding = "UTF-8"}
11+
12+
13+
group = 'io.github.mohammadrezaeicode'
14+
version = '0.1-SNAPSHOT'
15+
16+
java {
17+
withJavadocJar()
18+
withSourcesJar()
19+
}
20+
21+
repositories {
22+
mavenCentral()
23+
}
24+
25+
dependencies {
26+
testImplementation platform('org.junit:junit-bom:5.9.1')
27+
testImplementation 'org.junit.jupiter:junit-jupiter'
28+
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
29+
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
30+
compileOnly 'org.projectlombok:lombok:1.18.36'
31+
annotationProcessor 'org.projectlombok:lombok:1.18.36'
32+
}
33+
34+
publishing {
35+
publications {
36+
mavenJava(MavenPublication) {
37+
artifactId = "excel"
38+
from components.java
39+
versionMapping {
40+
usage('java-api') {
41+
fromResolutionOf('runtimeClasspath')
42+
}
43+
usage('java-runtime') {
44+
fromResolutionResult()
45+
}
46+
}
47+
pom {
48+
name = 'MR Excel'
49+
description = 'A versatile Java library for effortlessly generating .xlsx files from input objects. Seamlessly create Excel spreadsheets with data, formatting, formulas, and more.'
50+
url = 'https://github.com/mohammadrezaeicode/mr-excel-java'
51+
// properties = [
52+
// myProp: "value",
53+
// "prop.with.dots": "anotherValue"
54+
// ]
55+
licenses {
56+
license {
57+
name = 'The Apache License, Version 2.0'
58+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
59+
}
60+
}
61+
developers {
62+
developer {
63+
id = 'MohammadR'
64+
name = 'Mohammad Rezaei'
65+
email = 'mohammadrezaeicode@gmail.com'
66+
}
67+
}
68+
scm {
69+
connection = 'scm:git:https://github.com/mohammadrezaeicode/mr-excel-java.git'
70+
developerConnection = 'scm:git:git@github.com:mohammadrezaeicode/mr-excel-java.git'
71+
url = 'https://github.com/mohammadrezaeicode/mr-excel-java'
72+
}
73+
repositories {
74+
maven {
75+
url = version.endsWith('SNAPSHOT') ?
76+
"https://s01.oss.sonatype.org/content/repositories/snapshots/" :
77+
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
78+
79+
credentials {
80+
username = project.findProperty("ossrhUsername") // Load from gradle.properties
81+
password = project.findProperty("ossrhPassword") // Load from gradle.properties
82+
}
83+
// def releasesRepoUrl = layout.buildDirectory.dir('repos/releases')
84+
// def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots')
85+
// url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
86+
}
87+
}
88+
}
89+
}
90+
}
91+
}
92+
93+
test {
94+
useJUnitPlatform()
95+
}
96+
tasks.withType(JavaCompile) {
97+
options.encoding = 'UTF-8'
98+
}
99+
//task javadocJar(type: Jar) {
100+
// classifier = 'javadoc'
101+
// from javadoc
102+
//}
103+
//
104+
//task sourcesJar(type: Jar) {
105+
// classifier = 'sources'
106+
// from sourceSets.main.allSource
107+
//}
108+
//java {
109+
// toolchain {
110+
// languageVersion = JavaLanguageVersion.of(11)
111+
// }
112+
// withJavadocJar()
113+
// withSourcesJar()
114+
//
115+
//}
116+
117+
118+
signing {
119+
sign publishing.publications.mavenJava
120+
}
121+
//
122+
//
123+
javadoc {
124+
if(JavaVersion.current().isJava9Compatible()) {
125+
options.addBooleanOption('html5', true)
126+
}
127+
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.gradle.jvmargs=-Dfile.encoding=UTF-8

gradle/wrapper/gradle-wrapper.jar

42.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)