Skip to content

Commit

Permalink
build scripts: prepare to publish to Maven central
Browse files Browse the repository at this point in the history
Generate javadocs, specify required data in pom.xml file.
  • Loading branch information
chashnikov committed Dec 11, 2018
1 parent b64b837 commit 6239b9b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ext.projectVersion = projectVersion

subprojects {
apply plugin: 'java'
version rootProject.ext.projectVersion
}

49 changes: 46 additions & 3 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {

apply plugin: 'maven-publish'

ext.projectVersion = projectVersion

jar {
baseName 'trove4j'
}
Expand Down Expand Up @@ -31,6 +33,15 @@ task sourceJar(type: Jar) {
from sourceSets.main.java
}

javadoc {
source = [sourceSets.main.java]
options.addStringOption("Xdoclint:none", "-quiet")
}

task javadocJar(type: Jar) {
from javadoc
}

artifacts {
archives sourceJar
}
Expand All @@ -41,10 +52,42 @@ publishing {
from components.java
groupId 'org.jetbrains.intellij.deps'
artifactId 'trove4j'
version '1.0.20160824'
version rootProject.ext.projectVersion
artifact sourceJar {
classifier "sources"
classifier 'sources'
}
artifact javadocJar {
classifier 'javadoc'
}
pom.withXml {
asNode().children().last() + {
resolveStrategy = DELEGATE_FIRST
name 'Trove4J'
description 'Fork of trove4j library used in IntelliJ Platform.'
url 'https://github.com/JetBrains/intellij-deps-trove4j'
scm {
url 'https://github.com/JetBrains/intellij-deps-trove4j'
connection 'scm:git:git://github.com/JetBrains/intellij-deps-trove4j.git'
developerConnection 'scm:git:ssh://github.com:JetBrains/intellij-deps-trove4j.git'
}
licenses {
license {
name 'GNU LESSER GENERAL PUBLIC LICENSE 2.1'
url 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html'
distribution 'repo'
}
}
developers {
developer {
id 'JetBrains'
name 'JetBrains Team'
organization 'JetBrains'
organizationUrl 'https://www.jetbrains.com'
}
}
}
}

}
}
}
Expand All @@ -61,7 +104,7 @@ bintray {
userOrg = 'jetbrains'

version {
name = '1.0.20160824'
name = rootProject.ext.projectVersion
}
}

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
projectVersion=1.0.20181211

0 comments on commit 6239b9b

Please sign in to comment.