Skip to content

Commit

Permalink
Use shadowJar and few cleanups
Browse files Browse the repository at this point in the history
Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
  • Loading branch information
shtripat committed Jan 18, 2024
1 parent d3d1219 commit 03af86c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 40 deletions.
32 changes: 6 additions & 26 deletions build/aws-sdk-java-v2/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.5/userguide/building_java_projects.html in the Gradle documentation.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
// Apply the application plugin to add support for building a CLI application in Java.
application
id("org.springframework.boot") version "2.6.2"
id("io.ktor.plugin") version "2.3.7"
id("com.github.johnrengelman.shadow") version "8.1.1"
}

repositories {
Expand All @@ -19,26 +20,12 @@ repositories {
}

dependencies {
// Use JUnit Jupiter for testing.
testImplementation(libs.junit.jupiter)

testRuntimeOnly("org.junit.platform:junit-platform-launcher")

// This dependency is used by the application.
implementation(libs.guava)

// AWS SDK dependencies
implementation(platform("software.amazon.awssdk:bom:2.21.36"))
implementation("software.amazon.awssdk:s3")
implementation("software.amazon.awssdk:sso")
implementation("software.amazon.awssdk:ssooidc")
implementation("software.amazon.awssdk:netty-nio-client")
implementation(platform("org.apache.logging.log4j:log4j-bom:2.20.0"))
implementation("org.apache.logging.log4j:log4j-slf4j2-impl")
implementation("org.apache.logging.log4j:log4j-1.2-api")
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
implementation("commons-logging:commons-logging:1.2")

// jackson dependency
val springBootPlatform = platform(SpringBootPlugin.BOM_COORDINATES)
Expand All @@ -49,6 +36,10 @@ dependencies {
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
}

tasks.withType<ShadowJar> {
archiveFileName.set("FunctionalTests.jar")
}

// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
Expand All @@ -60,14 +51,3 @@ application {
// Define the main class for the application.
mainClass.set("io.minio.awssdk.v2.tests.FunctionalTests")
}

ktor {
fatJar {
archiveFileName.set("FunctionalTests.jar")
}
}

tasks.named<Test>("test") {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}

This file was deleted.

10 changes: 0 additions & 10 deletions build/aws-sdk-java-v2/gradle/libs.versions.toml

This file was deleted.

2 changes: 1 addition & 1 deletion build/aws-sdk-java-v2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test_run_dir="$MINT_RUN_CORE_DIR/aws-sdk-java-v2"

cd "$(dirname "$(realpath "$0")")"

./gradlew buildFatJar
./gradlew clean build

cp app/build/libs/FunctionalTests.jar "$test_run_dir/"

Expand Down

0 comments on commit 03af86c

Please sign in to comment.