Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
waileong committed Feb 11, 2024
0 parents commit e598e97
Show file tree
Hide file tree
Showing 25 changed files with 1,569 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
21 changes: 21 additions & 0 deletions LICENSE.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
= The MIT License (MIT)

Copyright (c) 2024 Wai Leong

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
69 changes: 69 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
plugins {
id "java-library"
id "maven-publish"
id "signing"
id "org.springframework.boot" version "${spring_boot_version}"
id "org.graalvm.buildtools.native" version "${graalvm_buildtools_native_version}"
}

group = 'io.github.waileong'
version = '1.0.0'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}

repositories {
mavenCentral()
}

tasks.named("bootBuildImage") {
imageName = "waileong/${project.name}:${version}"
environment = [
"BP_JVM_VERSION": "21"
]
}

springBoot {
buildInfo()
}

dependencies {
implementation "io.github.waileong:spring-boot-fcm:$spring_boot_fcm_version"

// Spring Boot BOM for dependency management
implementation platform("org.springframework.boot:spring-boot-dependencies:$spring_boot_version")

// Spring Boot starters
implementation("org.springframework.boot:spring-boot-starter-aop")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")

// swagger
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:$springdoc_version")
implementation("io.swagger.core.v3:swagger-annotations:$io_swagger_v3_version")

// Annotation processor
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:$spring_boot_version")

// Testing dependencies
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.assertj:assertj-core")
}

// Java compile options
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.deprecation = true
options.compilerArgs.add("-parameters")
}

test {
useJUnitPlatform()
}
20 changes: 20 additions & 0 deletions docker-compose/spring-boot-fcm-native-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'

services:
spring-boot-fcm-native-image:
image: "docker.io/waileong/spring-boot-fcm-native-image:1.0.0"
restart: unless-stopped
ports:
- "8080:8080"
expose:
- "8080"
# environment:
# - TZ=
# - fcm.credential.project-id=
# - fcm.credential.client-email=
# - fcm.credential.private-key=
# - fcm.credential.private-key-id=
deploy:
resources:
limits:
memory: 128M
12 changes: 12 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
org.gradle.parallel=true
org.gradle.workers.max=4
org.gradle.jvmargs=-Xmx1024M


spring_boot_version=3.2.2
spring_boot_fcm_version=1.0.2
graalvm_buildtools_native_version=0.9.28

# swagger
springdoc_version=2.3.0
io_swagger_v3_version=2.2.20
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Thu Feb 08 20:36:47 MYT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit e598e97

Please sign in to comment.