Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Thechi2000 committed Nov 22, 2024
0 parents commit 2b2f42a
Show file tree
Hide file tree
Showing 54 changed files with 12,339 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

.idea

133 changes: 133 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
buildscript {
repositories {
mavenCentral()
}
}

plugins {
id 'jacoco'
id 'org.sonarqube' version '5.0.0.4638'
id 'java-library'
id 'maven-publish'
id 'signing'
}

repositories {
mavenCentral()
}

group = 'net.codecrete.qrbill'
version = '3.3.1'
archivesBaseName = 'qrbill-generator'

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

withJavadocJar()
withSourcesJar()
}

jar {
manifest {
attributes(
'Implementation-Title': 'Swiss QR Bill Generator',
'Implementation-Version': archiveVersion,
'Implementation-Vendor': 'Manuel Bleichenbacher'
)
}
}

javadoc {
include 'net/codecrete/qrbill/canvas/*'
include 'net/codecrete/qrbill/generator/*'

title = "QR Bill Generator ${version}"
options.addBooleanOption('html5', true)
}

test {
useJUnitPlatform()
}

artifacts {
archives javadocJar, sourcesJar
}

publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'qrbill-generator'
from components.java

pom {
name = 'Swiss QR Bill'
description = 'Java library for generating Swiss QR bills'
url = 'https://github.com/manuelbl/SwissQRBill'
licenses {
license {
name = 'The MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'manuelbl'
name = 'Manuel Bleichenbacher'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/manuelbl/SwissQRBill.git'
developerConnection = 'scm:git:ssh://github.com:manuelbl/SwissQRBill.git'
url = 'https://github.com/manuelbl/SwissQRBill/tree/master'
}
}
}
}
repositories {
maven {
def releaseRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releaseRepoUrl
authentication {
basic(BasicAuthentication)
}
credentials {
username = findProperty('ossrhUsername') ?: 'unknown'
password = findProperty('ossrhPassword') ?: 'unknown'
}
}
}
}

signing {
required { gradle.taskGraph.hasTask('publish') || gradle.taskGraph.hasTask('publishToMavenLocal') }
sign publishing.publications.mavenJava
}

sonar {
properties {
property 'sonar.projectName', 'Swiss QR Bill Generator (Java)'
property 'sonar.organization', 'manuelbl-github'
property 'sonar.host', 'https://sonarcloud.io'
}
}

jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = false
csv.required = false
}
}

dependencies {
api 'org.apache.pdfbox:pdfbox:3.0.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2' // Latest version
implementation 'io.nayuki:qrcodegen:1.8.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
systemProp.sonar.host.url=https://sonarcloud.io
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 2b2f42a

Please sign in to comment.