mirror of
https://github.com/jlengrand/OpenGraphKt.git
synced 2026-03-10 08:31:23 +00:00
Creating separate modules
* Lib module building * demo module needs fixing
This commit is contained in:
2
.idea/gradle.xml
generated
2
.idea/gradle.xml
generated
@@ -8,6 +8,8 @@
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/demo" />
|
||||
<option value="$PROJECT_DIR$/opengraphkt" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
|
||||
2
.idea/kotlinc.xml
generated
2
.idea/kotlinc.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="2.1.20" />
|
||||
<option name="version" value="2.1.21" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
kotlin("jvm") version "2.1.20"
|
||||
kotlin("jvm") version "2.1.21"
|
||||
application
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jsoup:jsoup:1.20.1")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
@@ -36,5 +35,5 @@ kotlin {
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = "nl.lengrand.opengraphkt.MainKt"
|
||||
mainClass = "fr.lengrand.opengraphkt.MainKt"
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package nl.lengrand.opengraphkt
|
||||
package fr.lengrand.opengraphkt
|
||||
|
||||
import java.io.File
|
||||
|
||||
35
opengraphkt/build.gradle.kts
Normal file
35
opengraphkt/build.gradle.kts
Normal file
@@ -0,0 +1,35 @@
|
||||
plugins {
|
||||
kotlin("jvm") version "2.1.21"
|
||||
}
|
||||
|
||||
group = "fr.lengrand"
|
||||
version = "0.1-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jsoup:jsoup:1.20.1")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
manifest {
|
||||
attributes(mapOf("Implementation-Title" to project.name,
|
||||
"Implementation-Version" to project.version))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(23)
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package nl.lengrand.opengraphkt
|
||||
package fr.lengrand.opengraphkt
|
||||
|
||||
import org.jsoup.Jsoup
|
||||
import org.jsoup.nodes.Document
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* DocumentFetcher's job is to take any type of input and transform it into a JSoup document for the Parser to then do its job
|
||||
@@ -22,7 +23,7 @@ class DocumentFetcher {
|
||||
* @param charsetName The charset to use for parsing (default is UTF-8)
|
||||
* @return A JSoup Document representing the parsed HTML
|
||||
*/
|
||||
fun fromFile(file: java.io.File, charsetName: String = "UTF-8") : Document {
|
||||
fun fromFile(file: File, charsetName: String = "UTF-8") : Document {
|
||||
return Jsoup.parse(file, charsetName)
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package nl.lengrand.opengraphkt
|
||||
package fr.lengrand.opengraphkt
|
||||
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.select.Elements
|
||||
@@ -1,4 +1,4 @@
|
||||
package nl.lengrand.opengraphkt
|
||||
package fr.lengrand.opengraphkt
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
import kotlin.test.assertEquals
|
||||
@@ -1,4 +1,6 @@
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
|
||||
}
|
||||
rootProject.name = "OpenGraphKt"
|
||||
rootProject.name = "OpenGraphKt"
|
||||
include("opengraphkt")
|
||||
include("demo")
|
||||
Reference in New Issue
Block a user