Skip to content

Commit 9d80f85

Browse files
author
Holger Brandl
committed
changed release channel from bintray to sonatype maven central
1 parent e86a041 commit 9d80f85

File tree

7 files changed

+331
-164
lines changed

7 files changed

+331
-164
lines changed

.gitignore

Lines changed: 8 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,13 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### Java template
3-
4-
*.class
5-
6-
# Mobile Tools for Java (J2ME)
7-
.mtj.tmp/
8-
9-
# Package Files #
10-
*.jar
11-
*.war
12-
*.ear
13-
14-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
15-
hs_err_pid*
16-
17-
18-
### Gradle template
1+
#gradle
192
.gradle
20-
build/
21-
22-
# Ignore Gradle GUI config
23-
gradle-app.setting
24-
25-
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
26-
!gradle-wrapper.jar
27-
28-
# Cache of project
29-
.gradletasknamecache
30-
31-
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
32-
# gradle/wrapper/gradle-wrapper.properties
33-
34-
35-
### JetBrains template
36-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
37-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
38-
39-
# User-specific stuff:
40-
.idea/workspace.xml
41-
.idea/tasks.xml
42-
.idea/dictionaries
43-
.idea/vcs.xml
44-
.idea/jsLibraryMappings.xml
45-
46-
# Sensitive or high-churn files:
47-
.idea/dataSources.ids
48-
.idea/dataSources.xml
49-
.idea/dataSources.local.xml
50-
.idea/sqlDataSources.xml
51-
.idea/dynamic.xml
52-
.idea/uiDesigner.xml
53-
54-
# Gradle:
55-
.idea/gradle.xml
56-
.idea/libraries
57-
58-
# Mongo Explorer plugin:
59-
.idea/mongoSettings.xml
60-
61-
## File-based project format:
62-
*.iws
63-
64-
## Plugin-specific files:
3+
/build/
654

665
# IntelliJ
67-
/out/
68-
69-
# mpeltonen/sbt-idea plugin
70-
.idea_modules/
71-
72-
# JIRA plugin
73-
atlassian-ide-plugin.xml
6+
out/
7+
.idea
8+
*iml
749

75-
# Crashlytics plugin (for Android Studio and IntelliJ)
76-
com_crashlytics_export_strings.xml
77-
crashlytics.properties
78-
crashlytics-build.properties
79-
fabric.properties
8010

11+
# sonatype credentials
12+
local.properties
13+
*.gpg

build.gradle

Lines changed: 55 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1+
//file:noinspection DifferentKotlinGradleVersion
12
buildscript {
2-
ext.kotlin_version = '1.1.51'
3+
ext.kotlin_version = '1.4.32'
4+
35
repositories {
46
mavenCentral()
57
}
8+
69
dependencies {
710
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
811
}
912
}
1013

11-
plugins { id "com.jfrog.bintray" version "1.2" }
1214

15+
plugins {
16+
id "java-library"
17+
// id "application"
18+
id "maven-publish"
19+
id "signing"
20+
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
21+
}
1322

1423
apply plugin: 'kotlin'
15-
apply plugin: 'application'
16-
apply plugin: 'maven'
17-
apply plugin: 'maven-publish'
18-
19-
//mainClassName = 'demo.HelloWorldKt'
20-
mainClassName = "de.mpicbg.scicomp.kutils.BashKt" // not needed but does not work without
2124

2225
defaultTasks 'run'
2326

2427
repositories {
2528
mavenCentral()
26-
mavenLocal()
29+
// mavenLocal()
2730
}
2831

2932
// https://docs.gradle.org/current/userguide/java_plugin.html#sec:java_plugin_and_dependency_management
@@ -36,79 +39,62 @@ dependencies {
3639
testCompile "io.kotlintest:kotlintest:2.0.1"
3740
}
3841

39-
// http://stackoverflow.com/questions/11474729/how-to-build-sources-jar-with-gradle
40-
task sourcesJar(type: Jar, dependsOn: classes) {
41-
classifier = 'sources'
42-
from sourceSets.main.allSource
43-
}
44-
45-
task javadocJar(type: Jar, dependsOn: javadoc) {
46-
classifier = 'javadoc'
47-
from javadoc.destinationDir
42+
java {
43+
withJavadocJar()
44+
withSourcesJar()
4845
}
4946

50-
//http://stackoverflow.com/questions/34377367/why-is-gradle-install-replacing-my-version-with-unspecified
51-
//group = 'de.mpicbg.scicomp'
5247
group = 'com.github.holgerbrandl'
5348
version = '1.2.5'
5449

5550

56-
artifacts {
57-
archives sourcesJar
58-
archives javadocJar
59-
}
60-
6151
publishing {
6252
publications {
63-
maven(MavenPublication) {
64-
from components.java
65-
artifact sourcesJar { classifier "sources" }
66-
67-
// just needed because artifact name differs from project name
68-
version = project.version
69-
artifactId = 'kscript-support'
70-
groupId = project.group
53+
mavenJava(MavenPublication) {
54+
from(components.java)
55+
56+
pom {
57+
name = "kscript-support-api"
58+
description = 'A support API to simplify scripting with kscript'
59+
url = 'https://github.com/holgerbrandl/kscript-support-api'
60+
61+
licenses {
62+
license {
63+
name = 'MIT'
64+
url = 'https://github.com/holgerbrandl/kscript-support-api/blob/master/LICENSE'
65+
}
66+
}
67+
68+
69+
scm {
70+
connection = 'scm:git:github.com/holgerbrandl/kscript-support-api.git'
71+
url = 'https://github.com/holgerbrandl/kscript-support-api.git'
72+
}
73+
74+
75+
developers {
76+
developer {
77+
id = 'holgerbrandl'
78+
name = 'Holger Brandl'
79+
email = 'holgerbrandl@gmail.com'
80+
}
81+
}
82+
}
7183
}
7284
}
7385
}
7486

7587

76-
install {
77-
repositories.mavenInstaller {
78-
pom.version = project.version
79-
pom.artifactId = 'kscript-support'
80-
pom.groupId = project.group
81-
}
82-
}
83-
84-
if (hasProperty('bintray_user') && hasProperty('bintray_key')) {
85-
bintray {
86-
87-
// property must be set in ~/.gradle/gradle.properties
88-
user = bintray_user
89-
key = bintray_key
90-
91-
publications = ['maven'] //When uploading configuration files
92-
93-
dryRun = false //Whether to run this as dry-run, without deploying
94-
publish = true // If version should be auto published after an upload
95-
96-
pkg {
97-
repo = 'github'
98-
name = 'kscript-support'
99-
vcsUrl = 'https://github.com/holgerbrandl/kscript-support-api'
100-
101-
licenses = ['MIT']
102-
publicDownloadNumbers = true
103-
104-
//Optional version descriptor
105-
version {
106-
name = project.version //Bintray logical version name
107-
desc = '.'
108-
released = new java.util.Date()
109-
vcsTag = 'v' + project.version
110-
}
88+
nexusPublishing {
89+
repositories {
90+
sonatype {
91+
snapshotRepositoryUrl = uri(project.properties["sonatypeStagingProfileId"])
92+
username = project.properties["ossrhUsername"]
93+
password = project.properties["ossrhPassword"]
11194
}
112-
/**/
11395
}
11496
}
97+
98+
signing {
99+
sign publishing.publications.mavenJava
100+
}

gradle/wrapper/gradle-wrapper.jar

53.1 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
zipStoreBase=GRADLE_USER_HOME
4+
zipStorePath=wrapper/dists
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

0 commit comments

Comments
 (0)