Skip to content

Commit c2869d6

Browse files
author
Victor Harlan D. Lacson
committed
Updated docs and cleanup
1 parent accba2b commit c2869d6

37 files changed

+33
-1149
lines changed

build.gradle.kts

Lines changed: 6 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
plugins {
2-
java
3-
kotlin("multiplatform") version "1.4.32"
4-
id("org.jetbrains.dokka").version("0.9.18")
5-
`maven-publish`
6-
signing
7-
jacoco
8-
}
9-
10-
val kotlinVersion = "1.4.32"
1+
val kotlinVersion = "1.5.10"
2+
val ktorVersion = "1.5.4"
113
val csvVersion = "0.15.2"
12-
val coroutineVersion = "1.4.3"
4+
val coroutineVersion = "1.5.0"
135

146
group = "io.github.blackmo18"
157
version = "0.7.1"
@@ -19,160 +11,12 @@ buildscript {
1911
mavenCentral()
2012
}
2113
dependencies {
22-
classpath("org.jetbrains.dokka:dokka-gradle-plugin:0.9.18")
23-
}
24-
}
25-
26-
repositories {
27-
mavenCentral()
28-
}
29-
30-
val dokkaJar = task<Jar>("dokkaJar") {
31-
group = JavaBasePlugin.DOCUMENTATION_GROUP
32-
archiveClassifier.set("javadoc")
33-
}
34-
val sourceJar = task<Jar>("sourceJar") {
35-
archiveClassifier.set("sources")
36-
from(sourceSets.getByName("main").allSource)
37-
}
38-
val metadata = task<Jar>("metadata") {
39-
archiveClassifier.set("metadata")
40-
from(sourceSets.getByName("main").allSource)
41-
}
42-
43-
val jvm = task<Jar>("jvm") {
44-
archiveClassifier.set("jvm")
45-
from(sourceSets.getByName("main").allSource)
46-
}
47-
48-
kotlin {
49-
jvm {
50-
compilations.all {
51-
kotlinOptions {
52-
jvmTarget = "1.8"
53-
noReflect = false
54-
}
55-
}
56-
mavenPublication {
57-
artifact(dokkaJar)
58-
}
59-
}
60-
61-
sourceSets {
62-
val commonMain by getting {
63-
dependencies {
64-
implementation(kotlin("stdlib-common"))
65-
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
66-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion")
67-
}
68-
}
69-
val commonTest by getting {
70-
dependencies {
71-
implementation(kotlin("test-annotations-common"))
72-
}
73-
}
74-
jvm().compilations["main"].defaultSourceSet {
75-
dependencies {
76-
implementation(kotlin("stdlib-common"))
77-
}
78-
}
79-
jvm().compilations["test"].defaultSourceSet {
80-
this.
81-
dependencies {
82-
implementation(kotlin("test"))
83-
implementation(kotlin("test-junit"))
84-
implementation("io.kotlintest:kotlintest-runner-junit5:3.3.2")
85-
implementation("com.github.doyaaaaaken:kotlin-csv-jvm:$csvVersion")
86-
}
87-
}
14+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0")
8815
}
8916
}
9017

91-
92-
93-
publishing {
94-
publications.all {
95-
(this as MavenPublication).pom {
96-
name.set("kotlin-grass")
97-
description.set("Csv File to Kotlin Data Class Parser")
98-
url.set("https://github.com/blackmo18/kotlin-grass")
99-
100-
organization {
101-
name.set("io.github.blackmo18")
102-
url.set("https://github.com/blackmo18")
103-
}
104-
licenses {
105-
license {
106-
name.set("Apache License 2.0")
107-
url.set("https://github.com/blackmo18/kotlin-grass/blob/master/LICENSE")
108-
}
109-
}
110-
scm {
111-
url.set("https://github.com/blackmo18/kotlin-grass")
112-
connection.set("scm:git:git://github.com/blackmo18/kotlin-grass.git")
113-
developerConnection.set("https://github.com/blackmo18/kotlin-grass")
114-
}
115-
developers {
116-
developer {
117-
name.set("blackmo18")
118-
}
119-
}
120-
}
121-
}
18+
allprojects {
12219
repositories {
123-
maven {
124-
credentials {
125-
val nexusUsername: String? by project
126-
val nexusPassword: String? by project
127-
username = nexusUsername
128-
password = nexusPassword
129-
}
130-
131-
val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
132-
val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
133-
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
134-
}
135-
}
136-
}
137-
138-
signing {
139-
sign(publishing.publications)
140-
}
141-
142-
143-
val jvmTest by tasks.getting(Test::class) {
144-
useJUnitPlatform { }
145-
}
146-
147-
jacoco {
148-
toolVersion = "0.8.5"
149-
}
150-
151-
tasks.jacocoTestReport {
152-
val coverageSourceDirs = arrayOf(
153-
"src/commonMain",
154-
"src/jvmMain"
155-
)
156-
157-
val classFiles = File("${buildDir}/classes/kotlin/jvm/")
158-
.walkBottomUp()
159-
.toSet()
160-
.filter { it.isFile }
161-
.filterNot {
162-
val fileNamePath = it.absolutePath
163-
val dir = fileNamePath.substring(0, fileNamePath.lastIndexOf(File.separator))
164-
dir.contains("io/github/blackmo18/grass/data")
165-
}
166-
167-
classDirectories.setFrom(classFiles)
168-
sourceDirectories.setFrom(files(coverageSourceDirs))
169-
additionalSourceDirs.setFrom(files(coverageSourceDirs))
170-
171-
executionData
172-
.setFrom(files("${buildDir}/jacoco/jvmTest.exec"))
173-
174-
reports {
175-
xml.isEnabled = true
176-
html.isEnabled = true
20+
mavenCentral()
17721
}
17822
}

docs/ChangeLog.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.8.0
2+
Decouple Custom Data Types
3+
- Java 8 date and time apis
4+
- Added custom transformers
15
# 0.7.1
26
Remove unused lines in JVM Date Parser
37

docs/README.MD

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
//doyaaaaaken's kotlin-csv
5454
implementation("com.github.doyaaaaaken:kotlin-csv-jvm:0.15.2")
5555
//kotlin-grass
56-
implementation("io.github.blackmo18:kotlin-grass-jvm:0.7.1")
56+
implementation("io.github.blackmo18:kotlin-grass-core-jvm:1.0.0")
57+
implementation("io.github.blackmo18:kotlin-grass-parser-jvm:0.8.0")
5758
```
5859

5960
#### Maven:
@@ -65,8 +66,13 @@ implementation("io.github.blackmo18:kotlin-grass-jvm:0.7.1")
6566
</dependency>
6667
<dependency>
6768
<groupId>io.github.blackmo18</groupId>
68-
<artifactId>kotlin-grass-jvm</artifactId>
69-
<version>0.7.1</version>
69+
<artifactId>kotlin-grass-core-jvm</artifactId>
70+
<version>1.0.0</version>
71+
</dependency>
72+
<dependency>
73+
<groupId>io.github.blackmo18</groupId>
74+
<artifactId>kotlin-grass-parser-jvm</artifactId>
75+
<version>0.8.0</version>
7076
</dependency>
7177
```
7278

@@ -131,6 +137,10 @@ If a variable in your data class is a nullable, all you have to do is mark it wi
131137
|---------------|---------------|---------------|
132138
|12:00|2020-12-31 12:00|2020-12-31|
133139
#### Date and Time Types
140+
#### Import the following
141+
```kotlin
142+
implementation("com.vhl.blackmo:kotlin-grass-core-jvm:1.0.0")
143+
```
134144
```kotlin
135145
data class DateTimeTypes(
136146
val time: LocalTime,
@@ -145,6 +155,7 @@ If a variable in your data class is a nullable, all you have to do is mark it wi
145155
dateFormat = "MM-dd-yyyy"
146156
timeFormat = "HH:mm:ss"
147157
dateTimeSeparator = "/"
158+
customDataTypes = arrayListOf(Java8DateTime)
148159
}
149160
```
150161
# Custom Mapping Support

kotlin-grass-core/build.gradle.kts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
java
3-
kotlin("multiplatform")
4-
id("org.jetbrains.dokka")
3+
id("org.jetbrains.kotlin.multiplatform")
4+
id("org.jetbrains.dokka") version "0.9.18"
55
`maven-publish`
66
signing
77
jacoco
@@ -12,7 +12,7 @@ val csvVersion = "0.15.2"
1212
val coroutineVersion = "1.4.3"
1313

1414
group = "io.github.blackmo18"
15-
version = "0.7.1"
15+
version = "1.0.0"
1616

1717
buildscript {
1818
repositories {
@@ -50,7 +50,6 @@ kotlin {
5050
compilations.all {
5151
kotlinOptions {
5252
jvmTarget = "1.8"
53-
noReflect = false
5453
}
5554
}
5655
mavenPublication {

kotlin-grass-date-time/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
java
3-
kotlin("multiplatform")
4-
id("org.jetbrains.dokka")
3+
id("org.jetbrains.kotlin.multiplatform")
4+
id("org.jetbrains.dokka") version "0.9.18"
55
`maven-publish`
66
signing
77
jacoco
@@ -12,7 +12,7 @@ val csvVersion = "0.15.2"
1212
val coroutineVersion = "1.4.3"
1313

1414
group = "io.github.blackmo18"
15-
version = "0.7.1"
15+
version = "0.8.0"
1616

1717
buildscript {
1818
repositories {
@@ -50,7 +50,6 @@ kotlin {
5050
compilations.all {
5151
kotlinOptions {
5252
jvmTarget = "1.8"
53-
noReflect = false
5453
}
5554
}
5655
mavenPublication {
@@ -82,7 +81,6 @@ kotlin {
8281
dependencies {
8382
implementation(project(":kotlin-grass-parser"))
8483
implementation(kotlin("test"))
85-
implementation(kotlin("test-junit"))
8684
implementation("io.kotlintest:kotlintest-runner-junit5:3.3.2")
8785
implementation("com.github.doyaaaaaken:kotlin-csv-jvm:$csvVersion")
8886
}

kotlin-grass-parser/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
java
3-
kotlin("multiplatform")
4-
id("org.jetbrains.dokka")
3+
id("org.jetbrains.kotlin.multiplatform")
4+
id("org.jetbrains.dokka") version "0.9.18"
55
`maven-publish`
66
signing
77
jacoco
@@ -12,7 +12,7 @@ val csvVersion = "0.15.2"
1212
val coroutineVersion = "1.4.3"
1313

1414
group = "io.github.blackmo18"
15-
version = "0.7.1"
15+
version = "0.8.0"
1616

1717
buildscript {
1818
repositories {
@@ -50,7 +50,6 @@ kotlin {
5050
compilations.all {
5151
kotlinOptions {
5252
jvmTarget = "1.8"
53-
noReflect = false
5453
}
5554
}
5655
mavenPublication {
@@ -81,7 +80,6 @@ kotlin {
8180
this.
8281
dependencies {
8382
implementation(kotlin("test"))
84-
implementation(kotlin("test-junit"))
8583
implementation("io.kotlintest:kotlintest-runner-junit5:3.3.2")
8684
implementation("com.github.doyaaaaaken:kotlin-csv-jvm:$csvVersion")
8785
}

src/commonMain/kotlin/io/github/blackmo18/grass/context/GrassParserContext.kt

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

0 commit comments

Comments
 (0)