summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--lib/java/CMakeLists.txt17
-rw-r--r--lib/java/README.md6
-rw-r--r--lib/java/build.gradle11
-rw-r--r--lib/java/gradle.properties6
-rw-r--r--lib/java/gradle/publishing.gradle4
-rw-r--r--lib/java/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--test/dart/test_client/bin/main.dart2
-rw-r--r--test/tests.json7
9 files changed, 39 insertions, 22 deletions
diff --git a/.travis.yml b/.travis.yml
index 5b931406a..aecdd130a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -123,6 +123,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 46064e600..a67845aba 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,16 @@ 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")
+ endif ()
+
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 +62,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 +84,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 505746508..7dca45620 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 4302f779d..5f0d2782b 100644
--- a/lib/java/build.gradle
+++ b/lib/java/build.gradle
@@ -20,13 +20,14 @@
// Using the legacy plugin classpath for Clover so it can be loaded optionally
buildscript {
repositories {
+ mavenCentral()
google()
jcenter()
gradlePluginPortal()
}
dependencies {
- classpath 'com.bmuschko:gradle-clover-plugin:2.2.0'
+ classpath 'com.bmuschko:gradle-clover-plugin:2.2.1'
}
}
@@ -34,7 +35,7 @@ plugins {
id 'java'
id 'maven'
id 'signing'
- id 'com.github.johnrengelman.shadow' version '2.0.2'
+ id 'com.github.johnrengelman.shadow' version '4.0.4'
}
description = 'Apache Thrift Java Library'
@@ -44,12 +45,10 @@ defaultTasks 'build'
// Version components for this project
group = property('thrift.groupid')
-// Drop the -dev suffix, we use the SNAPSHOT suffix for non-release versions
-def parsedVersion = property('thrift.version').toString().replace('-dev', '')
if (Boolean.parseBoolean(project.release)) {
- version = parsedVersion
+ version = property('thrift.version')
} else {
- version = parsedVersion + '-SNAPSHOT'
+ version = property('thrift.version') + '-SNAPSHOT'
}
// Keeping the rest of the build logic in functional named scripts for clarity
diff --git a/lib/java/gradle.properties b/lib/java/gradle.properties
index 056a96e8d..55256104f 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=1.0.0
thrift.groupid=org.apache.thrift
-release=true
+release=false
# Local Install paths
install.path=/usr/local/lib
@@ -25,9 +25,9 @@ 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
diff --git a/lib/java/gradle/publishing.gradle b/lib/java/gradle/publishing.gradle
index 6b0404373..029bff93d 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://github.com/apache/thrift.git'
+ url 'https://github.com/apache/thrift'
connection 'scm:git:https://github.com/apache/thrift.git'
- developerConnection 'scm:git:https://github.com/apache/thrift.git'
+ developerConnection 'scm:git:git@github.com:apache/thrift.git'
}
licenses {
diff --git a/lib/java/gradle/wrapper/gradle-wrapper.properties b/lib/java/gradle/wrapper/gradle-wrapper.properties
index 2c2bbe5f9..826c82f12 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
diff --git a/test/dart/test_client/bin/main.dart b/test/dart/test_client/bin/main.dart
index 996844b5b..feba61299 100644
--- a/test/dart/test_client/bin/main.dart
+++ b/test/dart/test_client/bin/main.dart
@@ -120,7 +120,7 @@ ArgResults _parseArgs(List<String> args) {
'compact': 'TCompactProtocol',
'json': 'TJsonProtocol'
});
- parser.addFlag('verbose', defaultsTo: false);
+ parser.addFlag('verbose', defaultsTo: true);
ArgResults results;
try {
diff --git a/test/tests.json b/test/tests.json
index 3381a1faf..1d4ba66d1 100644
--- a/test/tests.json
+++ b/test/tests.json
@@ -562,7 +562,7 @@
{
"name": "dart",
"client": {
- "timeout": 15,
+ "timeout": 20,
"transports": [
"buffered",
"framed",
@@ -578,8 +578,9 @@
],
"command": [
"dart",
- "--enable-asserts",
- "test_client/bin/main.dart"
+ "--checked",
+ "test_client/bin/main.dart",
+ "--verbose"
]
},
"workdir": "dart"