Skip to content

Commit

Permalink
Merge pull request #34 from BLCK-B/graalFix
Browse files Browse the repository at this point in the history
Graal fix
  • Loading branch information
BLCK-B authored Aug 16, 2024
2 parents 7fd3f1c + c9a4283 commit f8ecd09
Show file tree
Hide file tree
Showing 21 changed files with 306 additions and 104 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test-then-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
branches: [ "*" ]

env:
JAVA_VERSION: '22'

jobs:
gradle-test-build:
runs-on: ubuntu-latest
Expand All @@ -14,7 +17,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
Expand Down
51 changes: 13 additions & 38 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,12 @@

// https://services.gradle.org/distributions - in gradle-wrapper.properties

// TODO: build/resources/aot/META-INF/native-image tracing CI integration or git

plugins {
id 'java'
id 'application'
// https://plugins.gradle.org/plugin/org.beryx.jlink
id("org.beryx.jlink") version "3.0.1"
// https://plugins.gradle.org/plugin/org.springframework.boot
id("org.springframework.boot") version "3.3.2"
// https://plugins.gradle.org/plugin/io.spring.dependency-management
id("io.spring.dependency-management") version "1.1.6"
// https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html#_adding_the_plugin
id 'org.springframework.boot' version '3.3.2'
id 'io.spring.dependency-management' version '1.1.6'
id 'org.graalvm.buildtools.native' version '0.10.2'
}

Expand All @@ -41,42 +37,28 @@ repositories {
gradlePluginPortal()
}

configurations {
runtime
compile
}

graalvmNative {
binaries {
main {
binaries.all {
imageName.set("MusicReleaseTracker")
buildArgs.add('--verbose')
}
// sqlite
buildArgs.add('--initialize-at-build-time=org.sqlite.util.ProcessRunner')
// quick build
// buildArgs.add('-Ob')
}
}

java {
// minimal supported
sourceCompatibility = JavaVersion.VERSION_19
// target
targetCompatibility = JavaVersion.VERSION_21
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}

application {
mainModule = 'com.blck.MusicReleaseTracker'
mainClass = 'com.blck.MusicReleaseTracker.Main'
toolchain {
languageVersion = JavaLanguageVersion.of(22)
}
}

dependencies {

implementation 'org.xerial:sqlite-jdbc:3.46.0.1'
implementation 'org.jsoup:jsoup:1.18.1'

testImplementation(platform('org.junit:junit-bom:5.10.3'))
testImplementation(platform('org.junit:junit-bom:5.11.0'))
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.3'
testImplementation 'org.mockito:mockito-core:5.12.0'
Expand All @@ -91,13 +73,6 @@ bootJar {
archiveFileName = "MRT-${version}-linux-mac.jar"
}

jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'MusicReleaseTracker'
}
}

sourceSets {
main {
resources {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ public void cleanArtistSource(TablesEnum table, String artist) {
}

public List<MediaItem> getTableData(TablesEnum source, String artist) {
if (source == TablesEnum.combview || artist.isBlank())
if (artist == null)
return DB.loadCombviewTable();
else if (source == TablesEnum.combview || artist.isBlank())
return DB.loadCombviewTable();
else
return DB.loadTable(source, artist);
Expand Down
30 changes: 30 additions & 0 deletions src/main/resources/static/assets/index-BGTHEjB3.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/main/resources/static/assets/index-BJel56Jv.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f8ecd09

Please sign in to comment.