1
1
buildscript {
2
- ext. kotlin_version = ' 1.2.21 '
2
+ ext. kotlin_version = ' 1.5.10 '
3
3
4
4
ext. dev_name = ' Savvas Dalkitsis'
5
5
ext. dev_email = ' kurosavvas@gmail.com'
@@ -9,120 +9,108 @@ buildscript {
9
9
ext. project_description = ' json-merge is a library for merging json files for the JVM written in Kotlin'
10
10
ext. project_group = ' com.savvasdalkitsis'
11
11
ext. project_artifact = ' json-merge'
12
- ext. project_version = ' 0.0.4 '
12
+ ext. project_version = ' 0.0.5 '
13
13
ext. project_license = ' The Apache Software License, Version 2.0'
14
14
ext. project_license_tag = ' Apache-2.0'
15
15
ext. project_license_url = ' https://www.apache.org/licenses/LICENSE-2.0.txt'
16
16
17
17
repositories {
18
18
mavenCentral()
19
- jcenter()
20
19
}
21
20
dependencies {
22
21
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
23
- classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
24
22
}
25
23
}
26
24
27
- apply plugin : ' java '
28
- apply plugin : ' kotlin '
29
- apply plugin : ' maven-publish '
30
- apply plugin : ' com.jfrog.bintray '
31
-
32
- sourceCompatibility = 1.5
25
+ plugins {
26
+ id ' java '
27
+ id " org.jetbrains.kotlin.jvm " version " $k otlin_version "
28
+ id ' signing '
29
+ id ' maven '
30
+ }
33
31
34
32
repositories {
35
33
mavenCentral()
36
34
}
37
35
38
36
dependencies {
39
- compile (
40
- " org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version " ,
41
- " org.json:json:20180130" ,
37
+ implementation (
38
+ " org.json:json:20180130" ,
42
39
)
43
- testCompile (
44
- ' junit:junit:4.11 ' ,
45
- " com.shazam:shazamcrest:0.11" ,
40
+ testImplementation (
41
+ ' junit:junit:4.13.2 ' ,
42
+ " com.shazam:shazamcrest:0.11" ,
46
43
)
47
44
}
48
45
46
+ group project_group
47
+ version project_version
48
+ archivesBaseName = project_artifact
49
+
50
+ sourceCompatibility = 1.8
51
+
49
52
compileKotlin {
50
53
kotlinOptions. jvmTarget = " 1.8"
51
54
}
55
+
52
56
compileTestKotlin {
53
57
kotlinOptions. jvmTarget = " 1.8"
54
58
}
55
59
56
- task sourcesJar (type : Jar , dependsOn : classes ) {
60
+ task sourcesJar (type : Jar ) {
57
61
classifier = ' sources'
58
62
from sourceSets. main. allSource
59
63
}
60
64
61
- task javadocJar (type : Jar , dependsOn : javadoc ) {
65
+ task javadocJar (type : Jar ) {
62
66
classifier = ' javadoc'
63
- from javadoc. destinationDir
67
+ from javadoc
64
68
}
65
69
66
- publishing {
67
- publications {
68
- maven(MavenPublication ) {
69
- from components. java
70
- groupId project_group
71
- artifactId project_artifact
72
- version project_version
73
- artifact sourcesJar
74
- artifact javadocJar
75
- pom. withXml {
76
- asNode(). children(). last() + {
77
- resolveStrategy = Closure . DELEGATE_FIRST
78
- name project_name
79
- description project_description
70
+ artifacts {
71
+ archives javadocJar, sourcesJar
72
+ }
73
+
74
+ signing {
75
+ sign configurations. archives
76
+ }
77
+
78
+ uploadArchives {
79
+ repositories {
80
+ mavenDeployer {
81
+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
82
+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
83
+ authentication(userName : ossrhUsername, password : ossrhPassword)
84
+ }
85
+ snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
86
+ authentication(userName : ossrhUsername, password : ossrhPassword)
87
+ }
88
+ pom. project {
89
+ name project_name
90
+ packaging ' jar'
91
+ artifactId project_artifact
92
+ description project_description
93
+ url " https://github.com/$github_name /$project_name "
94
+ scm {
80
95
url " https://github.com/$github_name /$project_name "
81
- scm {
82
- url " https://github.com/$github_name /$project_name "
83
- connection " scm:git:git://github.com/$github_name /${ project_name} .git"
84
- developerConnection " scm:git:ssh:git@github.com:$github_name /${ project_name} .git"
85
- }
86
- licenses {
87
- license {
88
- name project_license
89
- url project_license_url
90
- distribution ' repo'
91
- }
96
+ connection " scm:git:git://github.com/$github_name /${ project_name} .git"
97
+ developerConnection " scm:git:ssh:git@github.com:$github_name /${ project_name} .git"
98
+ }
99
+ licenses {
100
+ license {
101
+ name project_license
102
+ url project_license_url
103
+ distribution ' repo'
92
104
}
93
- developers {
94
- developer {
95
- id github_name
96
- name dev_name
97
- email dev_email
98
- }
105
+ }
106
+ developers {
107
+ developer {
108
+ id github_name
109
+ name dev_name
110
+ email dev_email
99
111
}
100
112
}
101
113
}
102
114
}
103
115
}
104
- }
105
-
106
- bintray {
107
- user = BINTRAY_USER
108
- key = BINTRAY_API_KEY
109
- publications = [' maven' ]
110
- pkg {
111
- repo = ' maven'
112
- name = project_name
113
- desc = project_description
114
- licenses = [project_license_tag]
115
- publicDownloadNumbers = true
116
- websiteUrl = " https://github.com/$github_name /$project_name "
117
- issueTrackerUrl = " https://github.com/$github_name /$project_name /issues"
118
- vcsUrl = " https://github.com/$github_name /${ project_name} .git"
119
- githubRepo = " $github_name /$project_name "
120
- version {
121
- name = project_version
122
- vcsTag = project_version
123
- gpg {
124
- sign = true
125
- }
126
- }
127
- }
128
116
}
0 commit comments