Skip to content

Commit d97e042

Browse files
committed
update build, update tests, allow for byte array lengths 1-15
1 parent 7945c89 commit d97e042

9 files changed

Lines changed: 221 additions & 168 deletions

File tree

bld/proguard-rules.pro

Lines changed: 0 additions & 9 deletions
This file was deleted.

build.gradle.kts

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
13
plugins {
2-
kotlin("jvm") version "1.7.21"
3-
id("org.jetbrains.dokka") version "1.7.20"
4+
alias(libs.plugins.kotlin)
5+
alias(libs.plugins.dokka)
46
`maven-publish`
5-
`java-library`
67
}
78

89
group = "org.veupathdb.lib"
9-
version = "1.1.0"
10+
version = "1.2.0"
1011

1112
repositories {
1213
mavenCentral()
1314
}
1415

1516
dependencies {
16-
dokkaJekyllPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.7.20")
17-
18-
implementation(kotlin("stdlib"))
19-
20-
testImplementation("org.junit.jupiter:junit-jupiter:5.9.0")
21-
testImplementation("io.mockk:mockk:1.13.2")
17+
testImplementation(libs.junit.api)
18+
testRuntimeOnly(libs.junit.engine)
19+
testRuntimeOnly(libs.junit.launcher)
20+
testImplementation(libs.mockk)
2221
}
2322

2423
tasks.named<Test>("test") {
@@ -40,43 +39,19 @@ tasks.named<Test>("test") {
4039
}
4140

4241
java {
43-
targetCompatibility = JavaVersion.VERSION_1_8
44-
sourceCompatibility = JavaVersion.VERSION_1_8
42+
targetCompatibility = JavaVersion.VERSION_17
43+
sourceCompatibility = JavaVersion.VERSION_17
4544

4645
withSourcesJar()
4746
withJavadocJar()
4847
}
4948

5049
kotlin {
51-
jvmToolchain {
52-
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(16))
53-
}
54-
}
55-
56-
tasks.withType(PublishToMavenRepository::class.java).all {
57-
dependsOn(":release")
58-
}
59-
60-
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java).all {
61-
this.requiredServices
62-
63-
kotlinOptions {
64-
jvmTarget = "1.8"
65-
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
50+
compilerOptions {
51+
jvmTarget = JvmTarget.JVM_17
6652
}
6753
}
6854

69-
tasks.register("release", proguard.gradle.ProGuardTask::class.java) {
70-
dependsOn(":build")
71-
72-
configuration("bld/proguard-rules.pro")
73-
74-
libraryjars(files(configurations.compileClasspath.get().files))
75-
76-
injars("build/libs/hash-id-${project.version}.jar")
77-
outjars("build/libs/hash-id-$version-release.jar")
78-
}
79-
8055
publishing {
8156
repositories {
8257
maven {

gradle/libs.versions.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[versions]
2+
junit = "6.0.2"
3+
4+
[plugins]
5+
kotlin = { id = "org.jetbrains.kotlin.jvm", version = "2.3.10" }
6+
dokka = { id = "org.jetbrains.dokka", version = "2.1.0" }
7+
8+
[libraries]
9+
junit-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
10+
junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
11+
junit-launcher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junit" }
12+
mockk = { module = "io.mockk:mockk", version = "1.14.9" }

gradle/wrapper/gradle-wrapper.jar

285 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)