import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { jacoco id("maven-publish") kotlin("jvm") version "1.4.30" id("org.jlleitschuh.gradle.ktlint") version "10.0.0" id("org.owasp.dependencycheck") version "6.1.1" id("fr.coppernic.versioning") version "3.2.1" } group = "com.github.flecomte" version = versioning.info.tag repositories { mavenCentral() jcenter() } tasks.withType { kotlinOptions { jvmTarget = "11" sourceCompatibility = "11" targetCompatibility = "11" } } dependencies { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") implementation("org.jetbrains.kotlin:kotlin-reflect:1.4.31") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.1") implementation("com.fasterxml.jackson.datatype:jackson-datatype-joda:2.12.1") implementation("com.github.jasync-sql:jasync-postgresql:1.1.7") implementation("org.slf4j:slf4j-api:1.7.30") testImplementation("ch.qos.logback:logback-classic:1.2.3") testImplementation("ch.qos.logback:logback-core:1.2.3") testImplementation("io.mockk:mockk:1.10.6") testImplementation("org.junit.jupiter:junit-jupiter:5.7.1") testImplementation("org.amshove.kluent:kluent:1.65") } val sourcesJar by tasks.creating(Jar::class) { archiveClassifier.set("sources") from(sourceSets.getByName("main").allSource) } publishing { repositories { maven { name = "postgres-json" url = uri("https://maven.pkg.github.com/flecomte/postgres-json") credentials { username = System.getenv("GITHUB_USERNAME") password = System.getenv("GITHUB_TOKEN") } } } publications { create("postgres-json") { from(components["java"]) artifact(sourcesJar) } } }