Skip to content

Commit

Permalink
Merge pull request #48 from DmPanov/master
Browse files Browse the repository at this point in the history
IJI-618 Upload java-annotations library to Maven Central directly
  • Loading branch information
amaembo committed May 21, 2021
2 parents 3a16968 + 40a0928 commit ebba4d8
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
45 changes: 27 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import jetbrains.sign.GpgSignSignatoryProvider

/*
* Copyright 2000-2021 JetBrains s.r.o.
*
Expand All @@ -17,14 +19,21 @@
buildscript {
repositories {
jcenter()
maven { url "https://packages.jetbrains.team/maven/p/jcs/maven" }
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.jetbrains:jet-sign:38'
}
}

plugins {
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}

ext.projectVersion = projectVersion
if (System.getenv('BINTRAY_USER') == null) {
ext.publishingUser = System.getenv('PUBLISHING_USER')
ext.publishingPassword = System.getenv('PUBLISHING_PASSWORD')
if (ext.publishingPassword == null) {
ext.projectVersion = ext.projectVersion + '-SNAPSHOT'
}
println "##teamcity[setParameter name='java.annotations.version' value='$projectVersion']"
Expand All @@ -34,10 +43,19 @@ allprojects {
version rootProject.ext.projectVersion
}

nexusPublishing {
repositories {
sonatype {
username = rootProject.ext.publishingUser
password = rootProject.ext.publishingPassword
}
}
}

subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'signing'

repositories {
mavenCentral()
Expand Down Expand Up @@ -82,6 +100,8 @@ configure([project(':java5'), project(':java8')]) {
publishing {
publications {
mavenJava(MavenPublication) {
group rootProject.group
version rootProject.ext.projectVersion
artifactId archivesBaseName
artifact mainJar
artifact sourceJar {
Expand Down Expand Up @@ -122,20 +142,9 @@ configure([project(':java5'), project(':java8')]) {
}
}
}
if (System.getenv('BINTRAY_USER') != null) {
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publish = true
publications = ['mavenJava']
pkg {
userOrg = 'jetbrains'
repo = 'intellij-redist'
name = 'org.jetbrains:' + archivesBaseName
version {
name = rootProject.ext.projectVersion
}
}
}

signing {
sign publishing.publications
signatories = new GpgSignSignatoryProvider()
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down

0 comments on commit ebba4d8

Please sign in to comment.