// This file is in the public domain. plugins { id("org.jetbrains.kotlin.jvm") version "1.9.22" id("org.jetbrains.dokka") version "1.9.10" id("idea") id("java-library") id("maven-publish") } group = "tech.libeufin" version = "0.9.4" if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)){ throw new GradleException( "This build must be run with java 17 " + "or later (your version is java ${JavaVersion.current()})") } allprojects { ext { set("kotlin_version", "1.9.22") set("ktor_version", "2.3.9") set("clikt_version", "4.2.2") set("coroutines_version", "1.8.0") set("postgres_version", "42.7.1") set("junixsocket_version", "2.9.0") } repositories { mavenCentral() } } subprojects { apply plugin: 'org.jetbrains.dokka' } idea { module { excludeDirs += file("frontend") } } task versionFile() { def stdout = new ByteArrayOutputStream() exec { commandLine 'git', 'rev-parse', '--short', 'HEAD' standardOutput = stdout } def gitHash = stdout.toString().trim() def version = getRootProject().version new File("${projectDir}/common/src/main/resources", "version.txt").text = "v$version-git-$gitHash" } // See: https://stackoverflow.com/questions/24936781/gradle-plugin-project-version-number task libeufinVersion { doLast { println project.version } } classes { dependsOn versionFile }