--- a +++ b/build.gradle @@ -0,0 +1,105 @@ +plugins { + id 'org.springframework.boot' version '2.7.5' + id 'io.spring.dependency-management' version '1.0.15.RELEASE' + id 'java' + id 'application' + id("org.openjfx.javafxplugin") version "0.0.13" + id("maven-publish") +} + +group = 'com.dnanalyzer' +version = '1.2.1' +sourceCompatibility = '17' +targetCompatibility = '17' + +repositories { + mavenCentral() +} + +def junitVersion = "5.8.2" + +javafx { + version = "19" + modules = ['javafx.controls', 'javafx.graphics', 'javafx.fxml', 'javafx.base'] +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.json:json:20230227' + implementation 'info.picocli:picocli:4.7.5' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'javax.validation:validation-api:2.0.1.Final' + + compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.30' + implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.2.0' + + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation "org.junit.jupiter:junit-jupiter-api:5.9.2" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.9.2" + testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}" + testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.1' + + implementation 'com.google.guava:guava:31.0.1-jre' + implementation 'io.sentry:sentry:6.10.0' + implementation 'org.controlsfx:controlsfx:11.1.2' + implementation group: 'com.github.plexpt', name: 'chatgpt', version: '4.0.1' + implementation 'com.theokanning.openai-gpt3-java:service:0.11.1' + implementation 'org.apache.commons:commons-lang3:3.12.0' + implementation 'org.apache.commons:commons-io:1.3.2' +} + +application { + mainClass = 'DNAnalyzer.Main' +} + +publishing { + repositories { + maven { + name = "Github" + url = uri("https://maven.pkg.github.com/VerisimilitudeX/DNAnalyzer") + credentials { + username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME") + password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN") + } + } + } + + publications { + register("jar", MavenPublication) { + from(components["java"]) + groupId = 'live.dnanalyzer' + artifactId = 'dnanalyzer' + version = '3.0.0-beta.0' + pom { + url.set("https://github.com/VerisimilitudeX/DNAnalyzer.git") + } + } + } +} + +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } + + maxHeapSize = "2g" +} + +jar { + manifest { + attributes 'Main-Class': 'DNAnalyzer.Main' + } + + duplicatesStrategy = 'exclude' + + from { + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } +}