This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch 0.12.1
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 5798ed0864a29254d8a4ad5cd78b21b99ca73464
Author: James E. King III <[email protected]>
AuthorDate: Tue Jan 22 09:22:04 2019 -0500

    THRIFT-4746: changes for publishing 0.12.0 to maven; fix java debug vs. 
release build with cmake
---
 .travis.yml                                       |  6 ++++++
 lib/java/CMakeLists.txt                           | 16 +++++++++++-----
 lib/java/README.md                                |  6 +++++-
 lib/java/build.gradle                             |  1 +
 lib/java/gradle.properties                        | 16 +++++++++++++---
 lib/java/gradle/publishing.gradle                 |  6 +++---
 lib/java/gradle/wrapper/gradle-wrapper.properties |  2 +-
 7 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e09b8a4..54ebe00 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -135,6 +135,12 @@ jobs:
     - script: build/docker/run.sh
       env:
         - JOB="CMake"
+        - BUILD_ARG="-DCMAKE_BUILD_TYPE=Debug"
+
+    - script: build/docker/run.sh
+      env:
+        - JOB="CMake"
+        - BUILD_ARG="-DCMAKE_BUILD_TYPE=Release"
 
     # C++ specific options: compiler plug-in, threading model
     - script: build/docker/run.sh
diff --git a/lib/java/CMakeLists.txt b/lib/java/CMakeLists.txt
index 46064e6..a4327c5 100644
--- a/lib/java/CMakeLists.txt
+++ b/lib/java/CMakeLists.txt
@@ -18,6 +18,7 @@
 #
 
 if(ANDROID)
+
     set(THRIFT_AAR outputs/aar/thrift-debug.aar outputs/aar/thrift-release.aar)
     add_custom_command(
         OUTPUT ${THRIFT_AAR}
@@ -27,7 +28,7 @@ if(ANDROID)
     )
     add_custom_target(thrift_aar ALL DEPENDS ${THRIFT_AAR})
 
-else(ANDROID)
+else()
 
     if(IS_ABSOLUTE "${LIB_INSTALL_DIR}")
         set(JAVA_INSTALL_DIR "${LIB_INSTALL_DIR}/java")
@@ -41,11 +42,15 @@ else(ANDROID)
         set(JAVA_DOC_INSTALL_DIR 
"${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}/java")
     endif()
 
+    set(PRELEASE "true")
+    if (CMAKE_BUILD_TYPE MATCHES DEBUG)
+        set(PRELEASE "false")
+
     add_custom_target(ThriftJava ALL
         COMMENT "Building Java library using Gradle Wrapper"
         COMMAND ${GRADLEW_EXECUTABLE} ${GRADLE_OPTS} assemble
             --console=plain --no-daemon
-            -Prelease=true
+            -Prelease=${PRELEASE}
             -Pthrift.version=${thrift_VERSION}
             "-Pbuild.dir=${CMAKE_CURRENT_BINARY_DIR}/build"
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -56,7 +61,7 @@ else(ANDROID)
         COMMENT "Publishing Java Library to Apache Maven staging"
         COMMAND ${GRADLEW_EXECUTABLE} ${GRADLE_OPTS} clean uploadArchives
             --console=plain --no-daemon
-            -Prelease=true
+            -Prelease=${PRELEASE}
             -Pthrift.version=${thrift_VERSION}
             "-Pbuild.dir=${CMAKE_CURRENT_BINARY_DIR}/build"
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -78,10 +83,11 @@ else(ANDROID)
         add_test(NAME JavaTest
                 COMMAND ${GRADLEW_EXECUTABLE} ${GRADLE_OPTS} test
                     --console=plain --no-daemon
-                    -Prelease=true
+                    -Prelease=${PRELEASE}
                     -Pthrift.version=${thrift_VERSION}
                     "-Pbuild.dir=${CMAKE_CURRENT_BINARY_DIR}/build"
                     "-Pthrift.compiler=${THRIFT_COMPILER}"
                 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
     endif()
-endif(ANDROID)
+
+endif()
diff --git a/lib/java/README.md b/lib/java/README.md
index 1e4aed2..de515a5 100644
--- a/lib/java/README.md
+++ b/lib/java/README.md
@@ -138,11 +138,15 @@ properties to it.
     mavenUser=meMyselfAndI
     mavenPassword=MySuperAwesomeSecretPassword
 
+NOTE: If you do not have a secring.gpg file, see the
+[gradle signing 
docs](https://docs.gradle.org/current/userguide/signing_plugin.html)
+for instructions on how to generate it.
+
 It is also possible to manually publish using the Gradle build directly.
 With the key information and credentials in place the following will generate
 if needed the build artifacts and proceed to publish the results.
 
-    ./gradlew -Prelease=true -Pthrift.version=0.11.0 uploadArchives
+    ./gradlew -Prelease=true uploadArchives
 
 It is also possible to override the target repository for the Maven Publication
 by using a Gradle property, for example you can publish signed JAR files to 
your
diff --git a/lib/java/build.gradle b/lib/java/build.gradle
index 4302f77..6dd35e4 100644
--- a/lib/java/build.gradle
+++ b/lib/java/build.gradle
@@ -20,6 +20,7 @@
 // Using the legacy plugin classpath for Clover so it can be loaded optionally
 buildscript {
     repositories {
+        mavenCentral()
         google()
         jcenter()
         gradlePluginPortal()
diff --git a/lib/java/gradle.properties b/lib/java/gradle.properties
index 4955b4c..58ca5f8 100644
--- a/lib/java/gradle.properties
+++ b/lib/java/gradle.properties
@@ -3,7 +3,7 @@
 # the properties to minimize the changes in the dependencies.
 thrift.version=0.12.0
 thrift.groupid=org.apache.thrift
-release=true
+release=false
 
 # Local Install paths
 install.path=/usr/local/lib
@@ -25,9 +25,19 @@ 
maven-repository-url=https://repository.apache.org/service/local/staging/deploy/
 maven-repository-id=apache.releases.https
 
 # Dependency versions
-httpclient.version=4.4.1
+httpclient.version=4.5.6
 httpcore.version=4.4.1
-slf4j.version=1.7.12
+slf4j.version=1.7.25
 servlet.version=2.5
 junit.version=4.12
 mockito.version=1.9.5
+
+# Signing key information for artifacts PGP signature (values are examples)
+# signing.keyId=ABCD0123
+# signing.password=signingPassword
+# signing.secretKeyRingFile=/root/.gnupg/secring.gpg
+
+# Apache Maven staging repository user credentials
+# mavenUser=mavenUser
+# mavenPassword=mySuperSecretPassword
+
diff --git a/lib/java/gradle/publishing.gradle 
b/lib/java/gradle/publishing.gradle
index 961d58f..029bff9 100644
--- a/lib/java/gradle/publishing.gradle
+++ b/lib/java/gradle/publishing.gradle
@@ -61,9 +61,9 @@ def configurePom(pom) {
         url 'http://thrift.apache.org'
 
         scm {
-            url 'https://git-wip-us.apache.org/repos/asf?p=thrift.git'
-            connection 
'scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git'
-            developerConnection 
'scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git'
+            url 'https://github.com/apache/thrift'
+            connection 'scm:git:https://github.com/apache/thrift.git'
+            developerConnection 'scm:git:[email protected]:apache/thrift.git'
         }
 
         licenses {
diff --git a/lib/java/gradle/wrapper/gradle-wrapper.properties 
b/lib/java/gradle/wrapper/gradle-wrapper.properties
index 2c2bbe5..826c82f 100644
--- a/lib/java/gradle/wrapper/gradle-wrapper.properties
+++ b/lib/java/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip

Reply via email to