Skip to content

Commit

Permalink
Merge a25284c into 46c8d44
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-rogers committed Feb 12, 2022
2 parents 46c8d44 + a25284c commit d6ee01d
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 117 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/java-continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ jobs:
with:
build-root-directory: java
arguments: build
- name: Smoke test jar in client environment
uses: gradle/gradle-build-action@v2
with:
build-root-directory: java/smoketest
arguments: run
gradle-executable: java/gradlew
1 change: 1 addition & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ RUN mkdir /workspace && \
apt update && \
apt install git -y && \
apt install protobuf-compiler -y && \
apt install cmake -y && \
pip install pytest && \
pip install pytest-cov && \
pip install jupyterlab && \
Expand Down
8 changes: 4 additions & 4 deletions java/cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ dependencies {
implementation("info.picocli:picocli:4.2.0")

// lombok support
compileOnly("org.projectlombok:lombok:1.18.12")
annotationProcessor("org.projectlombok:lombok:1.18.12")
compileOnly("org.projectlombok:lombok:1.18.20")
annotationProcessor("org.projectlombok:lombok:1.18.20")
annotationProcessor("info.picocli:picocli:4.2.0")

testCompileOnly("org.projectlombok:lombok:1.18.12")
testAnnotationProcessor("org.projectlombok:lombok:1.18.12")
testCompileOnly("org.projectlombok:lombok:1.18.20")
testAnnotationProcessor("org.projectlombok:lombok:1.18.20")

// testng
testImplementation("org.testng:testng:6.8")
Expand Down
8 changes: 4 additions & 4 deletions java/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ dependencies {
api("com.google.code.findbugs:jsr305:3.0.2")

// lombok support
compileOnly("org.projectlombok:lombok:1.18.12")
annotationProcessor("org.projectlombok:lombok:1.18.12")
testCompileOnly("org.projectlombok:lombok:1.18.12")
testAnnotationProcessor("org.projectlombok:lombok:1.18.12")
compileOnly("org.projectlombok:lombok:1.18.20")
annotationProcessor("org.projectlombok:lombok:1.18.20")
testCompileOnly("org.projectlombok:lombok:1.18.20")
testAnnotationProcessor("org.projectlombok:lombok:1.18.20")

// testng
testImplementation("org.testng:testng:6.8")
Expand Down
2 changes: 1 addition & 1 deletion java/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
206 changes: 103 additions & 103 deletions java/gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,103 +1,103 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@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 Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@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" "-Xms64m"

@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
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@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 Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@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" "-Xms64m"

@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
27 changes: 27 additions & 0 deletions java/smoketest/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

apply plugin: 'java'
apply plugin: 'application'

mainClassName = 'SmokeTest'

repositories {
flatDir {
dirs '../build/libs', '../cli/build/libs', '../core/build/libs'
}
mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
implementation "ai.whylabs:core:0.1.7-b2"

implementation "org.apache.datasketches:datasketches-java:1.3.0-incubating"
implementation "com.google.protobuf:protobuf-java:3.13.0"

// lombok support
compileOnly("org.projectlombok:lombok:1.18.20")
annotationProcessor("org.projectlombok:lombok:1.18.20")
annotationProcessor("info.picocli:picocli:4.2.0")
}
Empty file added java/smoketest/settings.gradle
Empty file.
12 changes: 12 additions & 0 deletions java/smoketest/src/main/java/smoketest/SmokeTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import com.whylogs.core.DatasetProfile;
import com.whylogs.core.statistics.NumberTracker;
import com.whylogs.core.message.NumbersMessage;
import java.time.Instant;

public class SmokeTest {
public static void main(String[] args) {
DatasetProfile dsp = new DatasetProfile("test", Instant.now());
NumberTracker tracker = new NumberTracker();
NumbersMessage.Builder protobuf = tracker.toProtobuf();
}
}
14 changes: 9 additions & 5 deletions java/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
`java-library`
signing
`maven-publish`
id("com.github.maiflai.scalatest") version "0.26"
id("com.github.maiflai.scalatest") version "0.31"
}

repositories {
Expand All @@ -27,6 +27,10 @@ tasks.jar {
archiveBaseName.set(artifactBaseName)
}

tasks.withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

fun scalaPackage(groupId: String, name: String, version: String) =
"$groupId:${name}_$scalaVersion:$version"

Expand Down Expand Up @@ -82,10 +86,10 @@ dependencies {
implementation("com.squareup.okhttp3:okhttp:4.9.1")

// lombok support
compileOnly("org.projectlombok:lombok:1.18.12")
annotationProcessor("org.projectlombok:lombok:1.18.12")
testCompileOnly("org.projectlombok:lombok:1.18.12")
testAnnotationProcessor("org.projectlombok:lombok:1.18.12")
compileOnly("org.projectlombok:lombok:1.18.20")
annotationProcessor("org.projectlombok:lombok:1.18.20")
testCompileOnly("org.projectlombok:lombok:1.18.20")
testAnnotationProcessor("org.projectlombok:lombok:1.18.20")

// testng
testImplementation("org.testng:testng:6.8")
Expand Down

0 comments on commit d6ee01d

Please sign in to comment.