Skip to content
This repository has been archived by the owner on Dec 4, 2022. It is now read-only.

Commit

Permalink
- using kotlin kts now
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsdayrs committed Mar 20, 2020
1 parent 889c181 commit fae410f
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 35 deletions.
23 changes: 0 additions & 23 deletions build.gradle

This file was deleted.

38 changes: 38 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import org.gradle.jvm.tasks.Jar

group = "app.shosetsu.lib"
version = "1.0.0"
description = "Kotlin library for shosetsu"

plugins {
kotlin("jvm") version "1.3.61"
id("org.jetbrains.dokka") version "0.10.0"
}

tasks.dokka {
outputFormat = "html"
outputDirectory = "$buildDir/javadoc"
}

val dokkaJar by tasks.creating(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin docs with Dokka"
classifier = "javadoc"
}

repositories {
jcenter()
mavenCentral()
}

dependencies {
implementation(kotlin("stdlib"))
implementation("org.jsoup:jsoup:1.12.1")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61")
implementation("org.luaj:luaj-jse:3.0.1")
implementation("org.json:json:20190722")
implementation( "com.squareup.okhttp3:okhttp:4.2.1")
testImplementation("junit:junit:4.12")
// implementation("org.jetbrains.kolin:kotlin-test:v1.3.61")
}

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "shosetsu-kotlin-lib"
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package app.shosetsu.lib

import okhttp3.OkHttpClient
import org.junit.Test
import org.luaj.vm2.LuaValue
import org.luaj.vm2.lib.jse.JsePlatform
import java.io.File
Expand Down Expand Up @@ -28,14 +29,17 @@ import java.util.concurrent.TimeUnit.MILLISECONDS
*
* In IDEA, The Classpath should be shosetsu-services but the Working directory should be shosetsu-extensions.
*/
private object Test {
// CONFIG
private const val SEARCH_VALUE = "world"
private const val PRINT_LISTINGS = false
private const val PRINT_LIST_STATS = true
private const val PRINT_NOVELS = false
private const val PRINT_NOVEL_STATS = true
private const val PRINT_PASSAGES = false
class Test {
companion object{
// CONFIG
private const val SEARCH_VALUE = "world"
private const val PRINT_LISTINGS = false
private const val PRINT_LIST_STATS = true
private const val PRINT_NOVELS = false
private const val PRINT_NOVEL_STATS = true
private const val PRINT_PASSAGES = false
}


private val SOURCES = arrayOf(
"en/MTLNovel"
Expand Down Expand Up @@ -84,8 +88,8 @@ private object Test {
}

@Throws(java.io.IOException::class, InterruptedException::class)
@JvmStatic
fun main(args: Array<String>) {
@Test
fun main() {
try {
ShosetsuLib.libLoader = { loadScript(File("src/main/resources/lib/$it.lua")) }
ShosetsuLib.httpClient = OkHttpClient()
Expand Down

0 comments on commit fae410f

Please sign in to comment.