Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .utility/generate-api-diff.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash
# Author: Hanbin Cho (mraerok@gmail.com)
# Description: This script 1) downloads the latest java-sdk jar published in Maven Repo 2) builds the jar of current java-sdk version, then 3) generate an API diff report of the two versions.
# Assumptions
# 1. This script is placed in the project root of java-sdk.
# 1. This script is placed in .utility folder of the java-sdk.
# 2. Version format is [0-9].[0-9].[0-9]

# Step 1: Download the latest release of java-sdk published in Maven Repository.
Expand Down Expand Up @@ -34,7 +34,7 @@ popd
./gradlew shadowJar

# Step 5: Construct the filepath to the current version of java-sdk.
CURRENT_VERSION=`cat gradle.properties | grep "version=[0-9]\.[0-9]\.[0-9]" | cut -d '=' -f 2`
CURRENT_VERSION=`cat ../gradle.properties | grep "version=[0-9]\.[0-9]\.[0-9]" | cut -d '=' -f 2`
CURRENT_JAR_FILENAME="java-sdk-${CURRENT_VERSION}-jar-with-dependencies.jar"
CURRENT_JAR_BASEPATH="java-sdk/build/libs"
CURRENT_JAR_PATH="${CURRENT_JAR_BASEPATH}/${CURRENT_JAR_FILENAME}"
Expand All @@ -46,5 +46,4 @@ if [ ! -f $CURRENT_JAR_PATH ]; then
fi

# Step 7: Produce an API diff between the latest release and the current version using japicmp module.
# TODO: Figure out how to set japicmp task's properties (oldClasspath and newClasspath) through command-line invocation.
./gradlew japicmp -PoldJarPath="${LATEST_RELEASE_JAR_PATH}" -PnewJarPath="${CURRENT_JAR_PATH}" -PoldJarVersion="${LATEST_RELEASE_VERSION}" -PnewJarVersion="${CURRENT_VERSION}"
2 changes: 1 addition & 1 deletion .utility/generate_apidiff_index_html.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

# based on https://odoepner.wordpress.com/2012/02/17/shell-script-to-generate-simple-index-html/

Expand Down