plugins { id 'java' id 'com.gradleup.shadow' version '8.3.5' } group = 'telegram.files' version = '0.1.5' repositories { mavenCentral() } dependencies { implementation 'io.vertx:vertx-core:4.5.11' implementation 'io.vertx:vertx-web:4.5.11' implementation 'io.vertx:vertx-jdbc-client:4.5.11' implementation 'io.vertx:vertx-sql-client-templates:4.5.11' implementation 'io.vertx:vertx-health-check:4.5.11' implementation 'org.xerial:sqlite-jdbc:3.47.1.0' implementation 'io.agroal:agroal-api:1.16' implementation 'io.agroal:agroal-pool:1.16' implementation 'cn.hutool:hutool-core:5.8.34' implementation 'cn.hutool:hutool-log:5.8.34' implementation 'org.jooq:jool:0.9.15' implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.3' testImplementation 'io.vertx:vertx-junit5:4.5.11' testImplementation platform('org.junit:junit-bom:5.10.0') testImplementation 'org.junit.jupiter:junit-jupiter' } test { def envFile = file('../.env.test') if (envFile.exists()) { doFirst { envFile.eachLine { if (!it.startsWith("#") && !it.isEmpty()) { def (key, value) = it.tokenize('=') environment key, value } return } } } jvmArgs "-Djava.library.path=${System.getenv('TDLIB_PATH')}" environment "APP_ROOT", "${testClassesDirs.asPath}" useJUnitPlatform() } tasks.build { dependsOn shadowJar } shadowJar { archiveBaseName.set('telegram-files') archiveClassifier.set('') archiveVersion.set('') manifest { attributes( 'Main-Class': 'telegram.files.Start' ) } } tasks.named('jar') { manifest { attributes( 'Implementation-Title': project.name, 'Implementation-Version': project.version, 'Built-By': System.getProperty('user.name'), 'Build-Time': new Date().format('yyyy-MM-dd HH:mm:ss'), 'Git-Commit': getGitCommit() ) } } static def getGitCommit() { try { return 'git rev-parse --short HEAD'.execute().text.trim() } catch (ignored) { return 'unknown' } }