Skip to content

Commit 376938b

Browse files
authored
Merge pull request #2 from austinarbor/jitpack
Jitpack Support
2 parents c2882f4 + 078ec3b commit 376938b

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
kotlin("jvm") version "1.8.20"
33
`java-library`
4+
`maven-publish`
45
}
56

67
group = "dev.aga"
@@ -39,6 +40,18 @@ kotlin {
3940
jvmToolchain(17)
4041
}
4142

43+
publishing {
44+
publications {
45+
create<MavenPublication>("maven") {
46+
groupId = project.group as String
47+
artifactId = project.name
48+
version = project.version as String
49+
50+
from(components["java"])
51+
}
52+
}
53+
}
54+
4255
tasks {
4356
test {
4457
useJUnitPlatform()

jitpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jdk:
2+
- openjdk17

src/main/kotlin/dev/aga/sfm/KConstructorBiInstantiator.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class KConstructorBiInstantiator<S1, S2, T>(
1616

1717
override fun newInstance(s1: S1, s2: S2): T {
1818
val allArgValues = argBuilder.build(s1, s2)
19+
20+
@Suppress("UNCHECKED_CAST")
1921
val ctor = def.ctor as KFunction<T>
2022
val ctorParams = ctor.parameters.associateBy { it.name }
2123
val invokeArgs: Map<KParameter, Any?> =

0 commit comments

Comments
 (0)