build.gradle (2466B)
1 // This file is in the public domain. 2 3 plugins { 4 id("org.jetbrains.kotlin.jvm") version "2.3.21" 5 id("org.jetbrains.dokka") version "2.0.0" 6 id("idea") 7 id("java-library") 8 } 9 10 group = "tech.libeufin" 11 version = "1.6.4" 12 13 if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)){ 14 throw new GradleException( 15 "This build must be run with java 17 " + 16 "or later (your version is java ${JavaVersion.current()})") 17 } 18 19 allprojects { 20 ext { 21 set("kotlin_version", "2.3.21") 22 set("ktor_version", "3.5.0") 23 set("clikt_version", "5.1.0") 24 set("coroutines_version", "1.11.0") 25 set("postgres_version", "42.7.11") 26 set("junixsocket_version", "2.10.1") 27 set("shadow_version", "9.4.2") 28 set("prometheus_version", "1.6.1") 29 } 30 31 repositories { 32 mavenCentral() 33 } 34 } 35 36 subprojects { 37 apply plugin: 'org.jetbrains.dokka' 38 39 tasks.withType(Test) { 40 // Invalidate tests cache when editing SQL logic 41 inputs.dir("$rootDir/database-versioning").withPathSensitivity(PathSensitivity.RELATIVE) 42 // Or when editing ISO20022 test samples 43 inputs.dir("$rootDir/libeufin-nexus/sample").withPathSensitivity(PathSensitivity.RELATIVE) 44 inputs.dir("$rootDir/testbench/sample").withPathSensitivity(PathSensitivity.RELATIVE) 45 46 def failedTests = [] 47 48 afterTest { desc, result -> 49 if (result.resultType == TestResult.ResultType.FAILURE) { 50 failedTests << "${desc.className}.${desc.name}" 51 } 52 } 53 54 afterSuite { desc, result -> 55 if (desc.parent == null && !failedTests.isEmpty()) { 56 logger.lifecycle("") 57 logger.lifecycle("==== FAILED TESTS ====") 58 failedTests.each { logger.lifecycle(it) } 59 logger.lifecycle("======================") 60 } 61 } 62 63 testLogging { 64 events "failed" 65 exceptionFormat = 'full' 66 } 67 } 68 } 69 70 ext.getVersionWithGitHash = { -> 71 def gitHash = 'git rev-parse --short HEAD'.execute().text.trim() 72 return "v${project.version}-git-$gitHash" 73 } 74 75 task libeufinVersion { 76 doLast { 77 println getVersionWithGitHash() 78 } 79 } 80 81 dependencies { 82 dokka(project(":libeufin-common:")) 83 dokka(project(":libeufin-bank:")) 84 dokka(project(":libeufin-nexus:")) 85 dokka(project(":libeufin-ebics:")) 86 dokka(project(":libeufin-ebisync:")) 87 }