mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-4750: as3 changes to build and publish to maven central
This commit is contained in:
parent
5ecaeb9d4a
commit
52da9ab801
2
.gitignore
vendored
2
.gitignore
vendored
@ -105,6 +105,8 @@ project.lock.json
|
||||
/contrib/fb303/py/fb303/ttypes.py
|
||||
/depcomp
|
||||
/install-sh
|
||||
/lib/as3/.gradle/
|
||||
/lib/as3/build/
|
||||
/lib/cl/backport-update.zip
|
||||
/lib/cl/lib
|
||||
/lib/cl/run-tests
|
||||
|
@ -72,10 +72,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
llvm \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
unzip \
|
||||
valgrind \
|
||||
vim
|
||||
ENV PATH /usr/lib/llvm-6.0/bin:$PATH
|
||||
|
||||
# lib/as3 (ActionScript)
|
||||
RUN mkdir -p /usr/local/adobe/flex/4.6 && \
|
||||
cd /usr/local/adobe/flex/4.6 && \
|
||||
wget -q "http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip" && \
|
||||
unzip flex_sdk_4.6.zip
|
||||
ENV FLEX_HOME /usr/local/adobe/flex/4.6
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
`# C++ dependencies` \
|
||||
libboost-all-dev \
|
||||
|
29
configure.ac
29
configure.ac
@ -119,6 +119,7 @@ AC_ARG_ENABLE([libs],
|
||||
have_libs=yes
|
||||
if test "$enable_libs" = "no"; then
|
||||
have_libs="no"
|
||||
with_as3="no"
|
||||
with_cpp="no"
|
||||
with_c_glib="no"
|
||||
with_cl="no"
|
||||
@ -143,6 +144,18 @@ if test "$enable_libs" = "no"; then
|
||||
with_rs="no"
|
||||
fi
|
||||
|
||||
AX_THRIFT_LIB(as3, [as3], yes)
|
||||
have_as3=no
|
||||
if test "$with_as3" = "yes"; then
|
||||
if test "${FLEX_HOME+set}" = set; then
|
||||
AC_PATH_PROGS([FLEX_COMPC], [compc], "fail", [$PATH$PATH_SEPARATOR$FLEX_HOME/bin])
|
||||
if test "$FLEX_COMPC" != "fail"; then
|
||||
have_as3="yes"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(WITH_AS3, [test "$have_as3" = "yes"])
|
||||
|
||||
AX_THRIFT_LIB(cpp, [C++], yes)
|
||||
have_cpp=no
|
||||
if test "$with_cpp" = "yes"; then
|
||||
@ -202,6 +215,7 @@ if test "$with_c_glib" = "yes"; then
|
||||
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0], have_glib2=yes, have_glib2=no)
|
||||
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0], have_gobject2=yes, have_gobject2=no)
|
||||
if test "$have_glib2" = "yes" -a "$have_gobject2" = "yes" ; then
|
||||
AC_PATH_PROG([GSETTINGS], [gsettings])
|
||||
have_c_glib="yes"
|
||||
fi
|
||||
fi
|
||||
@ -813,6 +827,7 @@ AC_CONFIG_FILES([
|
||||
compiler/cpp/test/Makefile
|
||||
compiler/cpp/src/thrift/version.h
|
||||
lib/Makefile
|
||||
lib/as3/Makefile
|
||||
lib/cl/Makefile
|
||||
lib/cpp/Makefile
|
||||
lib/cpp/test/Makefile
|
||||
@ -893,6 +908,8 @@ AC_CONFIG_FILES([
|
||||
tutorial/rs/Makefile
|
||||
])
|
||||
|
||||
if test "$have_as3" = "yes" ; then MAYBE_AS3="as3" ; else MAYBE_AS3="" ; fi
|
||||
AC_SUBST([MAYBE_AS3])
|
||||
if test "$have_cpp" = "yes" ; then MAYBE_CPP="cpp" ; else MAYBE_CPP="" ; fi
|
||||
AC_SUBST([MAYBE_CPP])
|
||||
if test "$have_c_glib" = "yes" ; then MAYBE_C_GLIB="c_glib" ; else MAYBE_C_GLIB="" ; fi
|
||||
@ -940,6 +957,7 @@ AC_OUTPUT
|
||||
echo
|
||||
echo "$PACKAGE $VERSION"
|
||||
echo
|
||||
echo "Building ActionScript3 Library : $have_as3"
|
||||
echo "Building C (GLib) Library .... : $have_c_glib"
|
||||
echo "Building C# (Mono) Library ... : $have_csharp"
|
||||
echo "Building C++ Library ......... : $have_cpp"
|
||||
@ -962,6 +980,17 @@ echo "Building Py3 Library ......... : $have_py3"
|
||||
echo "Building Ruby Library ........ : $have_ruby"
|
||||
echo "Building Rust Library ........ : $have_rs"
|
||||
|
||||
if test "$have_as3" = "yes" ; then
|
||||
echo
|
||||
echo "ActionScript Library:"
|
||||
echo " FLEX_HOME ................. : $FLEX_HOME"
|
||||
echo " Using compc version ....... : $($FLEX_COMPC --version)"
|
||||
fi
|
||||
if test "$have_c_glib" = "yes" ; then
|
||||
echo
|
||||
echo "C (glib):"
|
||||
echo " Using glib version ........ : $($GSETTINGS --version)"
|
||||
fi
|
||||
if test "$have_csharp" = "yes" ; then
|
||||
echo
|
||||
echo "C# Library:"
|
||||
|
@ -20,6 +20,10 @@
|
||||
SUBDIRS = json xml
|
||||
PRECROSS_TARGET =
|
||||
|
||||
if WITH_AS3
|
||||
SUBDIRS += as3
|
||||
endif
|
||||
|
||||
if WITH_CPP
|
||||
# cpp dir is picked directly by plugin build
|
||||
if !WITH_PLUGIN
|
||||
|
68
lib/as3/CMakeLists.txt
Normal file
68
lib/as3/CMakeLists.txt
Normal file
@ -0,0 +1,68 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
if (IS_ABSOLUTE "${LIB_INSTALL_DIR}")
|
||||
set(AS3_INSTALL_DIR "${LIB_INSTALL_DIR}/as3")
|
||||
else ()
|
||||
set(AS3_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/as3")
|
||||
endif ()
|
||||
|
||||
set(PRELEASE "true")
|
||||
if (CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
set(PRELEASE "false")
|
||||
endif ()
|
||||
|
||||
add_custom_target(ThriftAs3 ALL
|
||||
COMMENT "Building as3 library using Gradle Wrapper"
|
||||
COMMAND ${GRADLEW_EXECUTABLE} ${GRADLE_OPTS} compileFlex
|
||||
--console=plain --no-daemon
|
||||
-Prelease=${PRELEASE}
|
||||
"-Pbuild.dir=${CMAKE_CURRENT_BINARY_DIR}/build"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
# Enable publishing from CMake if the publishing information is provided
|
||||
if (NOT CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
add_custom_target(MavenPublishAs3
|
||||
COMMENT "Publishing as3 library to Apache Maven staging"
|
||||
COMMAND ${GRADLEW_EXECUTABLE} ${GRADLE_OPTS} clean publishMavenPublicationToMavenRepository
|
||||
--console=plain --no-daemon
|
||||
-Prelease=${PRELEASE}
|
||||
-Psign=${PRELEASE}
|
||||
"-Pbuild.dir=${CMAKE_CURRENT_BINARY_DIR}/build"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif ()
|
||||
|
||||
# Hook the CMake install process to the results from make ALL.
|
||||
# This works best when 'make all && sudo make install/fast' is used.
|
||||
# Using slash to end the source location to avoid copying the directory path.
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build/libs/
|
||||
DESTINATION ${AS3_INSTALL_DIR}
|
||||
FILES_MATCHING PATTERN "libthrift-as3.swc")
|
||||
|
||||
if (BUILD_TESTING)
|
||||
add_test(NAME As3Test
|
||||
COMMAND ${GRADLEW_EXECUTABLE} ${GRADLE_OPTS} test
|
||||
--console=plain --no-daemon
|
||||
-Prelease=${PRELEASE}
|
||||
"-Pbuild.dir=${CMAKE_CURRENT_BINARY_DIR}/build"
|
||||
"-Pthrift.compiler=${THRIFT_COMPILER}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif ()
|
60
lib/as3/Makefile.am
Normal file
60
lib/as3/Makefile.am
Normal file
@ -0,0 +1,60 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
all-local:
|
||||
./gradlew $(GRADLE_OPTS) compile \
|
||||
-Prelease=true \
|
||||
--console=plain
|
||||
|
||||
install-exec-hook:
|
||||
./gradlew $(GRADLE_OPTS) publishToMavenLocal \
|
||||
-Prelease=true \
|
||||
--console=plain
|
||||
|
||||
clean-local:
|
||||
./gradlew $(GRADLE_OPTS) clean \
|
||||
-Prelease=true \
|
||||
--console=plain
|
||||
$(RM) -r .gradle
|
||||
|
||||
check-local: $(THRIFT)
|
||||
./gradlew $(GRADLE_OPTS) test \
|
||||
-Prelease=true \
|
||||
--console=plain
|
||||
|
||||
maven-publish:
|
||||
./gradlew $(GRADLE_OPTS) publishMavenPublicationToMavenRepository \
|
||||
-Prelease=true \
|
||||
-Psign=true \
|
||||
--console=plain
|
||||
|
||||
dist-hook:
|
||||
$(RM) -r $(distdir)/.gradle/
|
||||
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt \
|
||||
README.md \
|
||||
build.gradle \
|
||||
coding_standards.md \
|
||||
gradle \
|
||||
gradle.properties \
|
||||
gradlew \
|
||||
gradlew.bat \
|
||||
settings.gradle \
|
||||
src
|
37
lib/as3/README.md
Normal file
37
lib/as3/README.md
Normal file
@ -0,0 +1,37 @@
|
||||
# Apache Thrift ActionScript Library
|
||||
|
||||
## Building
|
||||
|
||||
We use gradle and gradlefx to build the as3 library. Unfortunately gradlefx requires
|
||||
an older version of gradle (2.5) but it still works - for now. If you use the docker
|
||||
container to do the build, the Adobe Flex SDK 4.6 is installed and the FLEX_HOME
|
||||
environment variable is configured:
|
||||
|
||||
dev@ubuntu:~/thrift$ docker run -v $(pwd):/thrift/src:rw -it thrift/thrift-build:ubuntu-bionic /bin/bash
|
||||
root@7624b61bbf84:/thrift/src# cd lib/as3
|
||||
root@7624b61bbf84:/thrift/src/lib/as3# ./gradlew -Prelease=true compileFlex
|
||||
|
||||
...
|
||||
|
||||
:compileFlex UP-TO-DATE
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
|
||||
Total time: 10.784 secs
|
||||
|
||||
root@7624b61bbf84:/thrift/src/lib/as3# ls -ls build/
|
||||
total 4
|
||||
4 -rw-r--r-- 1 root root 1379 Jan 22 19:23 libthrift-as3.swc
|
||||
|
||||
## Publishing
|
||||
|
||||
We use a similar gradle-based signing and publishing mechanism as in the java
|
||||
library. See the java library [README.md](../java/README.md) for more details.
|
||||
|
||||
To publish into a local .m2 repository you can mount a directory into the docker container,
|
||||
for example:
|
||||
|
||||
dev@ubuntu:~/thrift$ docker run -v~/.m2:/root/.m2 -v $(pwd):/thrift/src:rw -it thrift/thrift-build:ubuntu-bionic /bin/bash
|
||||
root@7624b61bbf84:/thrift/src/lib/as3# ./gradlew -Prelease=true publishToMavenLocal
|
||||
|
||||
You will find your `~/.m2` directory is now populated with a release build `swc`.
|
56
lib/as3/build.gradle
Normal file
56
lib/as3/build.gradle
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath group: 'org.gradlefx', name: 'gradlefx', version: '1.5.0'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
}
|
||||
|
||||
apply plugin: 'gradlefx'
|
||||
|
||||
description = 'Apache Thrift ActionScript Library'
|
||||
frameworkLinkage = 'none'
|
||||
group = property('thrift.groupid')
|
||||
srcDirs = ['src']
|
||||
type = 'swc'
|
||||
|
||||
// We use the SNAPSHOT suffix for non-release versions
|
||||
if (Boolean.parseBoolean(project.release)) {
|
||||
additionalCompilerOptions = ['-compiler.debug=false', '-compiler.strict=true']
|
||||
version = property('thrift.version')
|
||||
} else {
|
||||
additionalCompilerOptions = ['-compiler.debug=true', '-compiler.strict=true']
|
||||
version = property('thrift.version') + '-SNAPSHOT'
|
||||
}
|
||||
|
||||
defaultTasks 'compile'
|
||||
|
||||
// Keeping the rest of the build logic in functional named scripts for clarity
|
||||
apply from: 'gradle/publishing.gradle'
|
||||
|
@ -1,5 +0,0 @@
|
||||
# Maven Ant tasks Jar details
|
||||
mvn.ant.task.version=2.1.3
|
||||
mvn.repo=http://repo1.maven.org/maven2
|
||||
mvn.ant.task.url=${mvn.repo}/org/apache/maven/maven-ant-tasks/${mvn.ant.task.version}
|
||||
mvn.ant.task.jar=maven-ant-tasks-${mvn.ant.task.version}.jar
|
@ -1,182 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<project name="libthrift-as3" default="compile" basedir="."
|
||||
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
|
||||
|
||||
<property name="as3.artifactid" value="${ant.project.name}"/>
|
||||
|
||||
<property name="thrift.root" location="${basedir}/../../"/>
|
||||
<property name="thrift.java.dir" location="${thrift.root}/lib/java"/>
|
||||
<property name="build.tools.dir" location="${thrift.java.dir}/build/tools/"/>
|
||||
<property name="thrift_compiler" value="${thrift.root}/compiler/cpp/thrift"/>
|
||||
<property file="${basedir}/build.properties"/>
|
||||
|
||||
<!-- inherit from the java build file for version and other properties -->
|
||||
<property file="${thrift.java.dir}/gradle.properties" />
|
||||
|
||||
<property environment="env"/>
|
||||
|
||||
<condition property="version" value="${thrift.version}">
|
||||
<isset property="release"/>
|
||||
</condition>
|
||||
<property name="version" value="${thrift.version}-SNAPSHOT"/>
|
||||
|
||||
<property name="as3.final.name" value="${as3.artifactid}-${version}"/>
|
||||
|
||||
<property name="src" value="${basedir}/src"/>
|
||||
<property name="build.dir" value="${basedir}/build"/>
|
||||
|
||||
<property name="as3.swc.file" location="${build.dir}/${as3.final.name}.swc"/>
|
||||
<property name="as3.pom.xml" location="${build.dir}/${as3.final.name}.pom"/>
|
||||
|
||||
<target name="init" depends="setup.init,flex.init" unless="init.finished">
|
||||
<property name="init.finished" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="setup.init">
|
||||
<tstamp/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${build.tools.dir}"/>
|
||||
</target>
|
||||
|
||||
<target name="flex.check" unless="FLEX_HOME">
|
||||
<fail message='You must set the FLEX_HOME property pointing to your flex SDK, eg. ant -DFLEX_HOME="/Applications/Adobe Flex Builder 3/sdks/3.2.0"'/>
|
||||
</target>
|
||||
|
||||
<target name="flex.init" depends="flex.check" unless="flex.finished">
|
||||
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
|
||||
<property name="flex.finished" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init">
|
||||
<path id="as.src.files">
|
||||
<fileset dir="${src}/">
|
||||
<include name="**/*.as"/>
|
||||
</fileset>
|
||||
</path>
|
||||
<pathconvert
|
||||
property="as.src.classes"
|
||||
pathsep=" "
|
||||
dirsep="."
|
||||
refid="as.src.files"
|
||||
>
|
||||
<map from="${src}/" to=""/>
|
||||
<mapper type="glob" from="*.as" to="*"/>
|
||||
</pathconvert>
|
||||
|
||||
<compc output="${as3.swc.file}" include-classes="${as.src.classes}">
|
||||
<source-path path-element="${src}"/>
|
||||
</compc>
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="${build.dir}" />
|
||||
</target>
|
||||
|
||||
<target name="mvn.ant.tasks.download" depends="setup.init,mvn.ant.tasks.check" unless="mvn.ant.tasks.found">
|
||||
<get src="${mvn.ant.task.url}/${mvn.ant.task.jar}" dest="${build.tools.dir}/${mvn.ant.task.jar}" usetimestamp="true"/>
|
||||
</target>
|
||||
|
||||
<target name="mvn.ant.tasks.check">
|
||||
<condition property="mvn.ant.tasks.found">
|
||||
<typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="mvn.init" depends="mvn.ant.tasks.download" unless="mvn.finished">
|
||||
<echo message="${mvn.ant.task.jar}"/>
|
||||
<!-- Download mvn ant tasks, download dependencies, and setup pom file -->
|
||||
<typedef uri="antlib:org.apache.maven.artifact.ant" classpath="${build.tools.dir}/${mvn.ant.task.jar}"/>
|
||||
|
||||
<!-- remote repositories used to download dependencies from -->
|
||||
<artifact:remoteRepository id="central" url="${mvn.repo}"/>
|
||||
<artifact:remoteRepository id="apache" url="${apache.repo}"/>
|
||||
|
||||
<!-- Pom file information -->
|
||||
<artifact:pom id="pom"
|
||||
groupId="${thrift.groupid}"
|
||||
artifactId="${as3.artifactid}"
|
||||
version="${version}"
|
||||
url="http://thrift.apache.org"
|
||||
name="Apache Thrift"
|
||||
description="Thrift is a software framework for scalable cross-language services development."
|
||||
packaging="swc"
|
||||
>
|
||||
<remoteRepository refid="central"/>
|
||||
<remoteRepository refid="apache"/>
|
||||
<license name="The Apache Software License, Version 2.0" url="${license}"/>
|
||||
<scm 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://git-wip-us.apache.org/repos/asf?p=thrift.git"
|
||||
/>
|
||||
<!-- Thrift Developers -->
|
||||
<developer id="mcslee" name="Mark Slee"/>
|
||||
<developer id="dreiss" name="David Reiss"/>
|
||||
<developer id="aditya" name="Aditya Agarwal"/>
|
||||
<developer id="marck" name="Marc Kwiatkowski"/>
|
||||
<developer id="jwang" name="James Wang"/>
|
||||
<developer id="cpiro" name="Chris Piro"/>
|
||||
<developer id="bmaurer" name="Ben Maurer"/>
|
||||
<developer id="kclark" name="Kevin Clark"/>
|
||||
<developer id="jake" name="Jake Luciani"/>
|
||||
<developer id="bryanduxbury" name="Bryan Duxbury"/>
|
||||
<developer id="esteve" name="Esteve Fernandez"/>
|
||||
<developer id="todd" name="Todd Lipcon"/>
|
||||
<developer id="geechorama" name="Andrew McGeachie"/>
|
||||
<developer id="molinaro" name="Anthony Molinaro"/>
|
||||
<developer id="roger" name="Roger Meier"/>
|
||||
<developer id="jfarrell" name="Jake Farrell"/>
|
||||
<developer id="jensg" name="Jens Geyer"/>
|
||||
<developer id="carl" name="Carl Yeksigian"/>
|
||||
</artifact:pom>
|
||||
|
||||
<!-- Generate the pom file -->
|
||||
<artifact:writepom pomRefId="pom" file="${as3.pom.xml}"/>
|
||||
|
||||
<property name="mvn.finished" value="true"/>
|
||||
</target>
|
||||
|
||||
<macrodef name="signAndDeploy">
|
||||
<!-- Sign and deploy jars to apache repo -->
|
||||
<attribute name="file"/>
|
||||
<attribute name="classifier" default=""/>
|
||||
<attribute name="packaging" default="jar"/>
|
||||
<attribute name="pom" default=""/>
|
||||
<sequential>
|
||||
<artifact:mvn fork="true">
|
||||
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file"/>
|
||||
<arg value="-DrepositoryId=${maven-repository-id}"/>
|
||||
<arg value="-Durl=${maven-repository-url}"/>
|
||||
<arg value="-DpomFile=@{pom}"/>
|
||||
<arg value="-Dfile=@{file}"/>
|
||||
<arg value="-Dclassifier=@{classifier}"/>
|
||||
<arg value="-Dpackaging=@{packaging}"/>
|
||||
<arg value="-Pgpg"/>
|
||||
</artifact:mvn>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="publish" depends="clean,compile,mvn.init">
|
||||
<!-- Compile, packages and then send release to apache maven repo -->
|
||||
<!-- run with: ant -Drelease=true publish -->
|
||||
<signAndDeploy file="${as3.pom.xml}" packaging="pom" classifier="" pom="${as3.pom.xml}"/>
|
||||
<signAndDeploy file="${as3.swc.file}" packaging="swc" classifier="" pom="${as3.pom.xml}"/>
|
||||
</target>
|
||||
</project>
|
22
lib/as3/gradle.properties
Normal file
22
lib/as3/gradle.properties
Normal file
@ -0,0 +1,22 @@
|
||||
# This file is shared currently between this Gradle build and the
|
||||
# Ant builds for fd303 and JavaScript. Keep the dotted notation for
|
||||
# the properties to minimize the changes in the dependencies.
|
||||
thrift.version=0.12.1thrift.groupid=org.apache.thrift
|
||||
release=false
|
||||
sign=false
|
||||
|
||||
# Local Install paths
|
||||
install.path=/usr/local/lib
|
||||
install.javadoc.path=/usr/local/lib
|
||||
|
||||
# Test execution properties
|
||||
testPort=9090
|
||||
|
||||
# Maven dependency download locations
|
||||
mvn.repo=http://repo1.maven.org/maven2
|
||||
apache.repo=https://repository.apache.org/content/repositories/releases
|
||||
|
||||
# Apache Maven publish
|
||||
license=http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
maven-repository-url=https://repository.apache.org/service/local/staging/deploy/maven2
|
||||
maven-repository-id=apache.releases.https
|
96
lib/as3/gradle/publishing.gradle
Normal file
96
lib/as3/gradle/publishing.gradle
Normal file
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// Following Gradle best practices to keep build logic organized
|
||||
|
||||
model {
|
||||
tasks.signMavenPublication {
|
||||
dependsOn compileFlex
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
|
||||
groupId = "$group"
|
||||
artifactId = "${project.name}"
|
||||
version = "$version"
|
||||
|
||||
def swcFile = file("$buildDir/libthrift-as3.swc")
|
||||
artifact(swcFile)
|
||||
|
||||
pom {
|
||||
description = 'Thrift is a software framework for scalable cross-language services development.'
|
||||
packaging = 'swc'
|
||||
|
||||
// older gradle doesn't recognize all the properties, so we inject them..
|
||||
withXml {
|
||||
asNode().with {
|
||||
appendNode('name', 'Apache Thrift')
|
||||
appendNode('url', 'http://thrift.apache.org/')
|
||||
appendNode('scm').with {
|
||||
appendNode('url', 'https://github.com/apache/thrift/')
|
||||
appendNode('connection', 'scm:git:https://github.com/apache/thrift.git')
|
||||
appendNode('developerConnection', 'scm:git:git@github.com:apache/thrift.git')
|
||||
}
|
||||
appendNode('issueManagement').with {
|
||||
appendNode('url', 'https://issues.apache.org/jira/projects/THRIFT/')
|
||||
appendNode('system', 'Jira')
|
||||
}
|
||||
appendNode('licenses').with {
|
||||
appendNode('license').with {
|
||||
appendNode('name', 'The Apache Software License, Version 2.0')
|
||||
appendNode('url', "${project.license}")
|
||||
}
|
||||
}
|
||||
appendNode('organization').with {
|
||||
appendNode('name', 'The Apache Software Foundation')
|
||||
appendNode('url', 'http://www.apache.org/')
|
||||
}
|
||||
appendNode('developers').with {
|
||||
appendNode('developer').with {
|
||||
appendNode('id', 'dev')
|
||||
appendNode('name', 'Apache Thrift Developers')
|
||||
appendNode('email', 'dev@thrift.apache.org')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url = property('maven-repository-url')
|
||||
|
||||
if (project.hasProperty('mavenUser') && project.hasProperty('mavenPassword')) {
|
||||
credentials {
|
||||
username = property('mavenUser')
|
||||
password = property('mavenPassword')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
required { property('sign') }
|
||||
sign publishing.publications.maven
|
||||
}
|
BIN
lib/as3/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
lib/as3/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
5
lib/as3/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
5
lib/as3/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
172
lib/as3/gradlew
vendored
Executable file
172
lib/as3/gradlew
vendored
Executable file
@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
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='"-Xmx64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
84
lib/as3/gradlew.bat
vendored
Normal file
84
lib/as3/gradlew.bat
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
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="-Xmx64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
20
lib/as3/settings.gradle
Normal file
20
lib/as3/settings.gradle
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
rootProject.name = 'libthrift-as3'
|
@ -46,7 +46,6 @@ defaultTasks 'build'
|
||||
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
|
||||
} else {
|
||||
|
@ -31,13 +31,3 @@ 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user