diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7118db4..413d5dda 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,11 +20,11 @@ jobs: uses: actions/checkout@v2 with: submodules: 'true' - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v2 with: - java-version: '17' - distribution: 'temurin' + java-version: '21' + distribution: 'liberica' - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle diff --git a/application/build.gradle b/application/build.gradle index e653f258..17415ea3 100644 --- a/application/build.gradle +++ b/application/build.gradle @@ -16,8 +16,6 @@ dependencies { implementation project(':components:scheduler') implementation(libs.yaci.store.starter) - implementation(libs.yaci.store.utxo.starter) - implementation(libs.yaci.store.account.starter) implementation(libs.cardano.client.lib) diff --git a/application/src/test/java/org/cardanofoundation/ledgersync/explorerconsumer/service/impl/TxInServiceImplTest.java b/application/src/test/java/org/cardanofoundation/ledgersync/explorerconsumer/service/impl/TxInServiceImplTest.java index 77149df1..b1ee5202 100644 --- a/application/src/test/java/org/cardanofoundation/ledgersync/explorerconsumer/service/impl/TxInServiceImplTest.java +++ b/application/src/test/java/org/cardanofoundation/ledgersync/explorerconsumer/service/impl/TxInServiceImplTest.java @@ -1,5 +1,5 @@ package org.cardanofoundation.ledgersync.explorerconsumer.service.impl; -; + import com.bloxbean.cardano.client.plutus.spec.RedeemerTag; import org.cardanofoundation.explorer.consumercommon.entity.*; import org.cardanofoundation.explorer.consumercommon.entity.Tx.TxBuilder; @@ -721,4 +721,4 @@ private static MaTxOut givenMaTxOut(long txOutId, String fingerprint, BigInteger .quantity(quantity) .build(); } -} \ No newline at end of file +} diff --git a/build.gradle b/build.gradle index 32baa7c5..0e3ccac2 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,7 @@ plugins { id 'nu.studer.jooq' version '8.2' id 'io.spring.dependency-management' version '1.1.3' + id 'org.ajoberstar.grgit' version '5.2.0' } @@ -22,6 +23,12 @@ subprojects { } archivesBaseName = 'ledger-sync-' + project.name + + def commit_id=getCheckedOutGitCommitHash() + if (project.version.endsWith("-SNAPSHOT")) { + version = "${project.version}".replace("-SNAPSHOT", "-${commit_id}-SNAPSHOT") + } + dependencyManagement { imports { mavenBom("org.springframework.boot:spring-boot-dependencies:3.1.4") @@ -34,8 +41,8 @@ subprojects { } compileJava { - sourceCompatibility = '17' - targetCompatibility = '17' + sourceCompatibility = '21' + targetCompatibility = '21' options.compilerArgs += ["-Aproject=${project.group}/${project.name}", "-parameters"] options.compilerArgs += ['-Amapstruct.defaultComponentModel=spring'] @@ -46,22 +53,20 @@ subprojects { } task sourceJar(type: Jar) { - classifier "sources" - from sourceSets.main.allJava + from sourceSets.main.allSource + archiveClassifier.set('sources') } - task javadocJar(type: Jar, dependsOn: javadoc) { - classifier "javadoc" - from javadoc.destinationDir - } - - artifacts { - archives jar - archives sourceJar - archives javadocJar + task javadocJar(type: Jar) { + from javadoc + archiveClassifier.set('javadoc') } test { useJUnitPlatform() } } + +def getCheckedOutGitCommitHash() { + grgit.head().abbreviatedId +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 806acc0f..fc99d71e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,5 @@ [libraries] -yaci-store-starter="com.bloxbean.cardano:yaci-store-spring-boot-starter:0.0.13-0bfab9f-SNAPSHOT" -yaci-store-utxo-starter="com.bloxbean.cardano:yaci-store-utxo-spring-boot-starter:0.0.13-0bfab9f-SNAPSHOT" -yaci-store-account-starter="com.bloxbean.cardano:yaci-store-account-spring-boot-starter:0.0.13-0bfab9f-SNAPSHOT" +yaci-store-starter="com.bloxbean.cardano:yaci-store-spring-boot-starter:0.0.13-b1e2780-SNAPSHOT" cardano-client-lib="com.bloxbean.cardano:cardano-client-lib:0.5.0" snakeyaml="org.yaml:snakeyaml:2.0" @@ -10,7 +8,7 @@ log4j-api="org.apache.logging.log4j:log4j-api:2.20.0" log4j-core="org.apache.logging.log4j:log4j-core:2.20.0" jakarta-validation-api="jakarta.validation:jakarta.validation-api:3.0.2" -lombok="org.projectlombok:lombok:1.18.26" +lombok="org.projectlombok:lombok:1.18.30" lombok-mapstruct-binding="org.projectlombok:lombok-mapstruct-binding:0.2.0" map-struct="org.mapstruct:mapstruct:1.5.3.Final" mapstruct-processor="org.mapstruct:mapstruct-processor:1.5.3.Final" @@ -33,4 +31,4 @@ jackson-core="com.fasterxml.jackson.core:jackson-core:2.15.2" jackson-annotation="com.fasterxml.jackson.core:jackson-annotations:2.15.2" jgit="org.eclipse.jgit:org.eclipse.jgit:6.5.0.202303070854-r" -javax-api="javax.xml.bind:jaxb-api:2.2.3" \ No newline at end of file +javax-api="javax.xml.bind:jaxb-api:2.2.3" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661e..e411586a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists