Skip to content

Commit 50ce008

Browse files
Added unit test for local jar dependency (relates to #127)
1 parent 4955a74 commit 50ce008

File tree

5 files changed

+54
-0
lines changed

5 files changed

+54
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
plugins {
2+
id 'java'
3+
id 'org.jetbrains.kotlin.jvm' version '1.3.41'
4+
}
5+
6+
group 'com.github.holgerbrandl.kscript.test'
7+
version '1.0-SNAPSHOT'
8+
9+
sourceCompatibility = 1.8
10+
11+
repositories {
12+
mavenCentral()
13+
}
14+
15+
dependencies {
16+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
17+
testCompile group: 'junit', name: 'junit', version: '4.12'
18+
}
19+
20+
compileKotlin {
21+
kotlinOptions.jvmTarget = "1.8"
22+
}
23+
compileTestKotlin {
24+
kotlinOptions.jvmTarget = "1.8"
25+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.github.holgerbrandl.kscript.test
2+
3+
class SomethingCool{
4+
5+
fun foo() = println("bar")
6+
7+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import com.github.holgerbrandl.kscript.test.SomethingCool
2+
3+
fun main() {
4+
SomethingCool().foo()
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
3+
Hoe to build?
4+
5+
```bash
6+
gradle jar
7+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env kscript
2+
3+
//KOTLIN_OPTS -cp build/libs/jartester-1.0-SNAPSHOT.jar
4+
//COMPILER_OPTS -cp build/libs/jartester-1.0-SNAPSHOT.jar
5+
6+
import com.github.holgerbrandl.kscript.test.SomethingCool
7+
8+
9+
SomethingCool().foo()
10+

0 commit comments

Comments
 (0)