Files
Sylwester LachiewiczandClaude Fable 5.1 6b42e7fd03 THRIFT-5566: Migrate Java tutorial from Ant to Gradle
Client: java, tutorial

Migrated tutorial/java from Apache Ant (build.xml, build.properties) to Gradle:
- Added build.gradle with Java and Application plugins.
- Configured Gradle composite build (includeBuild) to build and consume libthrift directly.
- Added generateThrift task to invoke thrift compiler on tutorial.thrift and shared.thrift.
- Added tutorial, tutorialServer, and tutorialClient tasks for running the tutorial.
- Updated JavaServer and JavaClient SSL keystore/truststore paths to valid crossTest resource locations.
- Updated Makefile.am to invoke Gradle instead of Ant and updated EXTRA_DIST.
- Updated README.md with Gradle execution instructions.
- Added /tutorial/java/.gradle/ to .gitignore.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 18:11:03 +02:00

65 lines
1.8 KiB
Makefile

#
# 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.
#
export CLASSPATH
# Make sure this doesn't fail if gradle is not configured.
clean-local:
GRADLE=$(GRADLE) ; if test -z "$$GRADLE" ; then GRADLE=: ; fi ; \
$$GRADLE $(GRADLE_OPTS) clean --console=plain
all-local:
$(GRADLE) $(GRADLE_OPTS) assemble \
-Pthrift.version=$(PACKAGE_VERSION) \
-Pthrift.compiler=$(THRIFT) \
--console=plain
check-local: all
$(GRADLE) $(GRADLE_OPTS) test \
-Pthrift.version=$(PACKAGE_VERSION) \
-Pthrift.compiler=$(THRIFT) \
--console=plain
tutorial: all
$(GRADLE) $(GRADLE_OPTS) tutorial \
-Pthrift.version=$(PACKAGE_VERSION) \
-Pthrift.compiler=$(THRIFT) \
--console=plain
tutorialserver: all
$(GRADLE) $(GRADLE_OPTS) tutorialServer \
-Pthrift.version=$(PACKAGE_VERSION) \
-Pthrift.compiler=$(THRIFT) \
--console=plain
tutorialclient: all
$(GRADLE) $(GRADLE_OPTS) tutorialClient \
-Pthrift.version=$(PACKAGE_VERSION) \
-Pthrift.compiler=$(THRIFT) \
--console=plain
distdir:
$(MAKE) $(AM_MAKEFLAGS) distdir-am
EXTRA_DIST = \
build.gradle \
settings.gradle \
src \
README.md