Skip to content

Commit b8e91d9

Browse files
committed
Merge branch 'feature/128/api' of github.com:wuseal/JsonToKotlinClass into feature/128/api
2 parents b93dd75 + bcc2562 commit b8e91d9

File tree

7 files changed

+30
-6
lines changed

7 files changed

+30
-6
lines changed

LIBRARY.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ We also have a `Java/Kotlin` library. With this you can convert `JSON` to `Kotli
44

55
## Installation
66

7-
Download `jar` file from [here](library/output/JsonToKotlinClassLibrary-v3.5.1.jar) and add it to your project
7+
Download `jar` file from [here](library/output/JsonToKotlinClassLibrary-3.5.1-alpha01.jar) and add it to your project.
8+
9+
10+
If your project is not in `Kotlin`, don't forgot to add kotlin runtime dependency.
11+
12+
```groovy
13+
// replace `1.3.61` with latest kotlin runtime version
14+
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: '1.3.61'
15+
```
816

917
## Usage
1018

library/META-INF/MANIFEST.MF

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Manifest-Version: 1.0
2+
Class-Path: kotlin-stdlib-jdk7-1.3.60.jar JsonToKotlinClass-3.5.1.jar an
3+
notations-13.0.jar gson-2.8.6.jar kotlin-stdlib-common-1.3.60.jar kotli
4+
n-stdlib-1.3.60.jar kotlin-stdlib-jdk8-1.3.60.jar
5+

library/build.gradle

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ plugins {
22
id 'org.jetbrains.kotlin.jvm' version '1.3.60'
33
}
44

5-
group 'org.example'
6-
version '1.0-SNAPSHOT'
5+
group 'wu.seal.jsontokotlin'
6+
version '3.5.1-alpha01'
77

88
repositories {
99
mavenCentral()
1010
}
1111

1212
dependencies {
1313
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
14-
implementation 'com.google.code.gson:gson:2.8.6'
1514
testImplementation "junit:junit:4.12"
1615
testImplementation('com.winterbe:expekt:0.5.0') {
1716
exclude group: "org.jetbrains.kotlin"
@@ -24,4 +23,16 @@ compileKotlin {
2423
}
2524
compileTestKotlin {
2625
kotlinOptions.jvmTarget = "1.8"
27-
}
26+
}
27+
28+
//create a single Jar with all dependencies
29+
task fatJar(type: Jar) {
30+
manifest {
31+
attributes 'Implementation-Title': 'JsonToKotlin Library',
32+
'Implementation-Version': version,
33+
'Main-Class': ''
34+
}
35+
baseName = project.name
36+
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
37+
with jar
38+
}

library/libs/gson-2.8.6.jar

235 KB
Binary file not shown.
666 KB
Binary file not shown.
-2.13 MB
Binary file not shown.

library/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
rootProject.name = 'library'
1+
rootProject.name = 'JsonToKotlinClassLibrary'
22

0 commit comments

Comments
 (0)