-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #323 from wuseal/fix/321/release-v3.6.1
Release : Library v3.6.1
- Loading branch information
Showing
10 changed files
with
152 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,50 @@ | ||
plugins { | ||
id 'org.jetbrains.kotlin.jvm' version '1.3.60' | ||
id 'org.jetbrains.kotlin.jvm' version '1.3.72' | ||
id 'maven' | ||
id 'maven-publish' | ||
id 'com.jfrog.bintray' version '1.8.5' | ||
} | ||
|
||
group 'wu.seal.jsontokotlin' | ||
version '3.5.1-alpha01' | ||
|
||
repositories { | ||
apply from: "${rootProject.projectDir}/dependencies.gradle" | ||
mavenCentral() | ||
} | ||
|
||
group 'wu.seal' | ||
version "$versions.j2k_version" | ||
|
||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" | ||
|
||
// Core library | ||
compile files('libs/JsonToKotlinClass-3.6.1.jar') | ||
|
||
// Gson : Gson | ||
implementation 'com.google.code.gson:gson:2.8.6' | ||
|
||
// Test dependencies | ||
testImplementation "junit:junit:4.12" | ||
testImplementation('com.winterbe:expekt:0.5.0') { | ||
|
||
// Expekt : An assertion library for Kotlin | ||
testImplementation('com.winterbe:expekt:0.5.0'){ | ||
exclude group: "org.jetbrains.kotlin" | ||
} | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
} | ||
|
||
jar { | ||
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } | ||
} | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
archiveClassifier.set('sources') | ||
from sourceSets.main.allSource | ||
} | ||
|
||
javadoc.failOnError = false | ||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
archiveClassifier.set('javadoc') | ||
from javadoc.destinationDir | ||
} | ||
|
||
compileKotlin { | ||
|
@@ -25,14 +54,75 @@ compileTestKotlin { | |
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
|
||
//create a single Jar with all dependencies | ||
task fatJar(type: Jar) { | ||
manifest { | ||
attributes 'Implementation-Title': 'JsonToKotlin Library', | ||
'Implementation-Version': version, | ||
'Main-Class': '' | ||
|
||
|
||
artifacts { | ||
archives sourcesJar | ||
archives javadocJar | ||
} | ||
|
||
def pomConfig = { | ||
licenses { | ||
license { | ||
name "GNU General Public License v3.0" | ||
url "https://www.gnu.org/licenses/gpl-3.0.en.html" | ||
distribution "repo" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id "shifarshifz" | ||
name "shifarshifz" | ||
email "[email protected]" | ||
} | ||
} | ||
|
||
scm { | ||
url "https://github.com/wuseal/JsonToKotlinClass" | ||
} | ||
baseName = project.name | ||
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } | ||
with jar | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenPublication(MavenPublication) { | ||
from components.java | ||
|
||
artifact sourcesJar { | ||
classifier "sources" | ||
} | ||
artifact javadocJar { | ||
classifier "javadoc" | ||
} | ||
groupId 'wu.seal.jsontokotlin' | ||
artifactId 'library' | ||
version "$versions.j2k_version" | ||
pom.withXml { | ||
def root = asNode() | ||
root.appendNode('description', 'To generate Kotlin data class code from JSON') | ||
root.appendNode('name', 'JsonToKotlinClass') | ||
root.appendNode('url', 'https://github.com/wuseal/JsonToKotlinClass') | ||
root.children().last() + pomConfig | ||
} | ||
} | ||
} | ||
} | ||
|
||
bintray { | ||
user = System.getenv('BINTRAY_USER') | ||
key = System.getenv('BINTRAY_API_KEY') | ||
publications = ['mavenPublication'] | ||
|
||
pkg { | ||
repo = 'maven' | ||
name = 'JsonToKotlinClass' | ||
userOrg = 'shifarshifz' | ||
licenses = ['GPL-3.0'] | ||
vcsUrl = 'https://github.com/wuseal/JsonToKotlinClass.git' | ||
version { | ||
name = versions.j2k_version | ||
desc = versions.j2k_version | ||
released = new Date() | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ext.versions = [ | ||
j2k_version: '3.6.1', | ||
kotlin_version : '1.3.72' | ||
] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters