Skip to content

Commit

Permalink
Gradle (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
JellyBrick authored Oct 31, 2021
1 parent 998b998 commit e3539eb
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.5.31"
id("org.jmailen.kotlinter") version "3.6.0"
`java-library`
`maven-publish`
}

repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}

val githubRepo = project.property("github.repo") as String

tasks.withType<KotlinCompile> {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}

tasks.withType<JavaCompile> {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}

dependencies {
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))

// Use the Kotlin JDK 8 standard library.
implementation(group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8")

// Use the Kotlin test library.
testImplementation(group = "org.jetbrains.kotlin", name = "kotlin-test")

// Use the Kotlin JUnit integration.
testImplementation(group = "org.jetbrains.kotlin", name = "kotlin-test-junit")
}

val sourcesJar by tasks.registering(Jar::class) {
from(sourceSets["main"].allSource)
archiveClassifier.set("sources")
}

0 comments on commit e3539eb

Please sign in to comment.