-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from chirag-ji/develop
Release 2.0.0
- Loading branch information
Showing
62 changed files
with
1,688 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# These are explicitly windows files and should use crlf | ||
*.bat text eol=crlf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Java Build | ||
|
||
on: | ||
push: { } | ||
pull_request: | ||
types: [ opened, synchronize, reopened ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | ||
with: | ||
arguments: build | ||
|
||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
- name: Build And Analyse | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: ./gradlew build sonarqube --info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build | ||
.idea/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import java.text.SimpleDateFormat | ||
|
||
plugins { | ||
id 'java-library' | ||
id "com.github.gmazzo.buildconfig" version "3.0.3" | ||
id "org.sonarqube" version "3.4.0.2513" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
int versionCode = 1 | ||
group 'com.chiragji' | ||
version '2.0.0' | ||
|
||
static def getDateTime() { | ||
return new Date().format("yyyyMMdd.HHmm") | ||
} | ||
|
||
Date buildDate = new Date() | ||
String buildDateTag = getDateTime() | ||
String buildTag = project.version + '_' + buildDateTag + '_' + versionCode | ||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ") | ||
|
||
buildConfig { | ||
def rootProjectName = project.rootProject.name.toLowerCase() | ||
|
||
packageName("${project.group}.${rootProjectName}") | ||
|
||
buildConfigField 'String', 'APP_NAME', "\"${project.rootProject.name}\"" | ||
buildConfigField 'String', 'VERSION', "\"$version\"" | ||
buildConfigField 'String', 'BUILD_TAG', "\"$buildDateTag\"" | ||
buildConfigField 'String', 'BUILD', "\"$version.$buildDateTag\"" | ||
buildConfigField 'String', 'LICENCE', "\"MIT License\"" | ||
buildConfigField 'String', 'COPYRIGHT_YEAR', "\"2019\"" | ||
buildConfigField 'java.util.Date', 'BUILD_DATE', "new java.util.Date(${buildDate.getTime()}L)" | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
withSourcesJar() | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes( | ||
"Version-Code": versionCode, | ||
"Build-Time": formatter.format(buildDate), | ||
"Release-Version": project.version, | ||
"Release-Tag": buildTag | ||
) | ||
} | ||
} | ||
|
||
sonarqube { | ||
properties { | ||
property "sonar.projectKey", "DocuConverter" | ||
property "sonar.organization", "chirag-ji" | ||
property "sonar.host.url", "https://sonarcloud.io" | ||
} | ||
} | ||
|
||
ext { | ||
apachePoi = "5.2.2" | ||
} | ||
|
||
dependencies { | ||
implementation 'com.google.guava:guava:31.1-jre' | ||
implementation 'args4j:args4j:2.33' | ||
implementation 'org.docx4j:docx4j:6.1.2' | ||
implementation 'org.apache.commons:commons-collections4:4.4' | ||
implementation 'org.apache.commons:commons-compress:1.21' | ||
implementation 'commons-io:commons-io:2.11.0' | ||
|
||
implementation 'com.itextpdf:itextpdf:5.5.13.3' | ||
implementation 'com.itextpdf:itext-asian:5.2.0' | ||
|
||
implementation "org.apache.poi:poi:$apachePoi" | ||
implementation "org.apache.poi:poi-ooxml-lite:$apachePoi" | ||
implementation "org.apache.poi:poi-scratchpad:$apachePoi" | ||
implementation "org.apache.poi:poi-ooxml:$apachePoi" | ||
implementation 'org.apache.xmlbeans:xmlbeans:5.1.0' | ||
|
||
implementation 'fr.opensagres.xdocreport:fr.opensagres.xdocreport.document:2.0.3' | ||
implementation 'fr.opensagres.xdocreport:fr.opensagres.xdocreport.document.docx:2.0.3' | ||
implementation 'fr.opensagres.xdocreport:fr.opensagres.xdocreport.converter.docx.xwpf:2.0.3' | ||
implementation 'fr.opensagres.xdocreport:org.apache.poi.xwpf.converter.pdf:1.0.6' | ||
implementation 'fr.opensagres.xdocreport:fr.opensagres.xdocreport.template:2.0.3' | ||
|
||
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2' | ||
testImplementation 'org.mockito:mockito-core:4.6.1' | ||
testImplementation 'org.mockito:mockito-junit-jupiter:4.6.1' | ||
testImplementation 'commons-io:commons-io:2.11.0' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.