/*
 * *******************************************************************************
 *  Copyright (c) 2025 Contributors to the Eclipse Foundation
 *
 *  See the NOTICE file(s) distributed with this work for additional
 *  information regarding copyright ownership.
 *
 *  This program and the accompanying materials are made available under the
 *  terms of the Apache License, Version 2.0 which is available at
 *  https://www.apache.org/licenses/LICENSE-2.0.
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 *  License for the specific language governing permissions and limitations
 *  under the License.
 *
 *  SPDX-License-Identifier: Apache-2.0
 * ******************************************************************************
 */

plugins {
    id 'java'
    id 'org.springframework.boot'
}

build {
    archivesBaseName = "wallet"
    version = "" // create foo.jar instead of foo-version.jar
}

springBoot {
    mainClass = 'org.eclipse.tractusx.wallet.stub.runtime.postgresql.WalletStubApplication'
}

group = "${group}"
version = "${version}"

repositories {
    mavenLocal()
    mavenCentral()
}

dependencies {
    developmentOnly enforcedPlatform(project(":"))
    testAnnotationProcessor enforcedPlatform(project(":"))
    developmentOnly 'org.springframework.boot:spring-boot-devtools'

    implementation project(':api')
    implementation project(':impl')
    implementation project(':rest:rest-api')
    implementation project(':rest:rest-service')
    implementation project(':persistence:persistence-api')
    implementation project(':persistence:postgresql')

    testImplementation project(':testUtils')

    // SPRING
    implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'

    // UTILS
    implementation 'org.apache.commons:commons-lang3'

    // EDC
    implementation "org.eclipse.edc:crypto-common-lib"

    // TEST
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
    testCompileOnly 'org.projectlombok:lombok'
    testAnnotationProcessor 'org.projectlombok:lombok'
    testImplementation "com.github.curious-odd-man:rgxgen"
    // added for test cases to support patch method
    testImplementation 'org.apache.httpcomponents.client5:httpclient5'
}

test {
    useJUnitPlatform()
}
