Skip to content

Commit

Permalink
feature: init
Browse files Browse the repository at this point in the history
  • Loading branch information
heowc committed May 1, 2024
1 parent 1534a13 commit 1312bbf
Show file tree
Hide file tree
Showing 35 changed files with 2,316 additions and 0 deletions.
1,129 changes: 1,129 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI
on: [push]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: graalvm/setup-graalvm@v1
with:
java-version: '21' # See 'Options' section below for all supported versions
distribution: 'graalvm' # See 'Options' section below for all available distributions
- name: Check Gradle Version
run: |
chmod +x gradlew
./gradlew --version
- name: Test task with Gradle Wrapper
run: |
./gradlew --parallel --max-workers=4 build
- name: Create report file
if: success()
run: |
sudo apt install -y graphviz
JAR_FILE=$(ls -al ./build/libs/ | tail -1 | awk '{print $9}')
java -jar ./build/libs/$JAR_FILE -d $(pwd) -p com.heowc.heo.core -o ${{ github.event.pull_request.number }}.png
- name: Create comment
if: success() && github.event.pull_request.number != ''
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body-path: ${{ github.event.pull_request.number }}.png
- name: If failure then upload test reports
if: failure()
uses: actions/upload-artifact@v4
with:
path: '*/build/reports/tests'
name: test-reports
retention-days: 7
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

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

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

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

### VS Code ###
.vscode/
6 changes: 6 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Use sdkman to run "sdk env" to initialize with correct JDK version
# Enable auto-env through the sdkman_auto_env config
# See https://sdkman.io/usage#config
# A summary is to add the following to ~/.sdkman/etc/config
# sdkman_auto_env=true
java=21.0.2-graalce
60 changes: 60 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.graalvm.buildtools.native' version '0.9.16'
}

group = 'com.heowc'
version = '0.0.1-SNAPSHOT'

java {
sourceCompatibility = '17'
}

repositories {
mavenCentral()
}

ext {
set('springShellVersion', "3.2.3")
}

dependencies {
implementation 'org.springframework.shell:spring-shell-starter'
implementation 'guru.nidi:graphviz-java:0.18.1'
implementation 'guru.nidi:graphviz-java-min-deps:0.18.1'

implementation 'org.jgrapht:jgrapht-core:1.5.2'
implementation 'org.jgrapht:jgrapht-io:1.5.2'

implementation 'com.github.javaparser:javaparser-core:3.25.10'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.shell:spring-shell-test'
testImplementation 'org.springframework.shell:spring-shell-test-autoconfigure'
}

dependencyManagement {
imports {
mavenBom "org.springframework.shell:spring-shell-dependencies:${springShellVersion}"
}
}

graalvmNative {
metadataRepository {
enabled = true
}
binaries {
main {
buildArgs.add('--verbose')
buildArgs.add('-H:IncludeResources=.*js$')
buildArgs.add("-H:ReflectionConfigurationFiles=${projectDir}/src/main/resources/META-INF/native-image/reflect-config.json")
buildArgs.add("-H:ResourceConfigurationFiles=${projectDir}/src/main/resources/META-INF/native-image/resource-config.json")
}
}
}

tasks.named('test') {
useJUnitPlatform()
}
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 1312bbf

Please sign in to comment.