-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
998b998
commit e3539eb
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
} |