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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Build with gradle
run: ./gradlew build checkLicense
run: ./gradlew build --no-daemon checkLicense
- name: Build docker
run: ./gradlew :java:timebase:server:dockerBuildImageAll :java:timebase:client:dockerBuildImageAll
run: ./gradlew :java:timebase:server:dockerBuildImageAll :java:timebase:client:dockerBuildImageAll --no-daemon
env:
DOCKER_REGISTRY_URL: ${{ secrets.DOCKER_REGISTRY_URL }}
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_HUB_USER }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Build with gradle
run: ./gradlew build
run: ./gradlew build --no-daemon
- name: Publish jars
run: >
./gradlew :java:timebase:aerondirect:publish :java:timebase:commons:publish :java:timebase:s3:publish
:java:timebase:pub:publish :java:timebase:api:publish :java:timebase:computations-api:publish
:java:timebase:computations-std:publish :java:timebase:qql:publish :java:timebase:client:publish :java:uploadArtifactsToMaven
run: |
./gradlew --no-daemon --parallel :java:timebase:aerondirect:publish :java:timebase:commons:publish :java:timebase:s3:publish \
:java:timebase:pub:publish :java:timebase:api:publish :java:timebase:computations-api:publish \
:java:timebase:computations-std:publish :java:timebase:qql:publish :java:timebase:client:publish :java:uploadArtifactsToMaven
env:
SONATYPE_REPOSITORY: ${{ secrets.SONATYPE_REPOSITORY }}
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Publish docker
run: ./gradlew :java:timebase:server:dockerPublishImageAll :java:timebase:client:dockerPublishImageAll
run: ./gradlew --no-daemon :java:timebase:server:dockerPublishImageAll :java:timebase:client:dockerPublishImageAll
env:
DOCKER_REGISTRY_URL: ${{ secrets.DOCKER_REGISTRY_URL }}
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_HUB_USER }}
Expand Down
39 changes: 29 additions & 10 deletions java/timebase/commons/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ description = "Timebase Commons Server API Library"

dependencies {
api project(':java:timebase:pub')
//implementation project(':java:timebase:snmpagent')

api ('com.epam.deltix:timebase-lang')
api ('com.epam.deltix:timebase-util')
Expand Down Expand Up @@ -57,32 +56,44 @@ import org.apache.tools.ant.filters.ReplaceTokens
// TODO: Copy to same folder in not the best idea. We should
// 1) move template to a separate source set (we don't want it in the output)
// 2) move generated class to a separate source path
task versionClass(type: Copy) {
tasks.register('versionClass', Copy) {
inputs.property("version", project.version)
inputs.property("revision", rootProject.ext.revision)
inputs.property("commitsAfterTag", String.valueOf(rootProject.ext.commitsAfterTag)) // Note: Gradle is supposed to accept null values but as for now (Gradle 5.4.1) it fails if value is null
inputs.property("commitTimestamp", rootProject.ext.commitTimestamp)

outputs.file("$project.projectDir/src/main/java/com/epam/deltix/util/Version.java")

def parsedVersion = project.version.split('\\.')
//outputs.file("$project.projectDir/src/main/java/deltix/util/Version.java")

from "$project.projectDir/src/main/java/deltix/util"
into "$project.projectDir/src/main/java/deltix/util"
from "$project.projectDir/src/main/java/com/epam/deltix/util"
into "$project.projectDir/src/main/java/com/epam/deltix/util"
include '**/Version-VCS.txt'
rename 'Version-VCS.txt', 'Version.java'
filter(ReplaceTokens, tokens: [MAJOR: parsedVersion[0], MINOR: parsedVersion[1], BUILDNAME: parsedVersion[2], WCREV: rootProject.ext.revision, COMMITS_AFTER_TAG: String.valueOf(rootProject.ext.commitsAfterTag), BUILD_DATE: rootProject.ext.commitTimestamp])
}

project.tasks.getByName('compileJava').dependsOn(versionClass)
tasks.named('compileJava') {
dependsOn 'versionClass'
}
tasks.named('processResources') {
dependsOn 'versionClass'
}
// Note: Right now Gradle caches outputs of "compileJava" even if file "Version.java" was changed.
// TODO: We should explicitly tell Gradle that task "compileJava" depends on outputs of "versionClass" talk.

clean.doFirst {
delete file("$project.projectDir/src/main/java/deltix/util/Version.java")
tasks.register('deleteVersionFile', Delete) {
delete "$project.projectDir/src/main/java/deltix/util/Version.java"
}
tasks.named('clean') {
dependsOn 'deleteVersionFile'
}

task copyWebapp(type: Copy) {
description 'Copy default webapp war file into quantserver pub resources'
tasks.register('copyWebapp', Copy) {
outputs.file(sourceSets.main.output.resourcesDir.absolutePath + '/webapp/timebase-web.war')

description 'Copy default webapp war file into timebase pub resources'
dependsOn ':java:timebase:web:war'
mustRunAfter clean
mustRunAfter processResources
Expand All @@ -94,4 +105,12 @@ task copyWebapp(type: Copy) {
into sourceSets.main.output.resourcesDir.absolutePath + '/webapp'
}

jar.dependsOn copyWebapp
//
//tasks.named('jar') {
// dependsOn 'copyWebapp'
//}

tasks.named('compileTestJava') {
mustRunAfter 'copyWebapp' // build fix
}

Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright 2023 EPAM Systems, Inc
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Licensed 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.
*/
package com.epam.deltix.util;

import com.epam.deltix.util.io.Home;
Expand All @@ -31,11 +15,11 @@ public abstract class Version {

private static final Log LOG = LogFactory.getLog(Version.class);
public static final int MAJOR = 6;
public static final int MINOR = 0;
public static final String NAME = "12-SNAPSHOT";
public static final String BUILD = "35e64ee76d";
public static final int MINOR = 2;
public static final String NAME = "18-SNAPSHOT";
public static final String BUILD = "3125d9f7";
public static final Integer COMMITS_AFTER_TAG = null;
public static final String BUILD_DATE = "2021-02-15 11:04:03 +0300";
public static final String BUILD_DATE = "2026-06-25 21:07:57 +0300";

public static final String VERSION_STRING;
public static final String MAJOR_VERSION_STRING;
Expand Down Expand Up @@ -96,6 +80,6 @@ public abstract class Version {
}

public static void main (String [] args) {
System.out.println ("EPAM Software - Version " + VERSION_STRING);
System.out.println ("Deltix Software - Version " + VERSION_STRING);
}
}
}
23 changes: 14 additions & 9 deletions java/timebase/qql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ def lexerAndParserDir = file("src/main/java/com/epam/deltix/qsrv/hf/tickdb/lang/

sourceSets.main.java.srcDirs generatedMainDir

task generateQqlLexer(type: JavaExec) {
tasks.register('generateQqlLexer', JavaExec) {
group = "QQL"
description = "Generates QQL lexer via flex library"
classpath = configurations.qqlLexerGenerator
main = "JFlex.Main"
mainClass = "JFlex.Main"
workingDir = lexerAndParserDir
args = ["qql.flex", "-d", "$generatedMainDir/$lexerAndParserPackage"]

Expand All @@ -65,11 +65,12 @@ task generateQqlLexer(type: JavaExec) {
.withPropertyName("outputDir")
}

task generateDdlParser(type: JavaExec, dependsOn: generateQqlLexer) {
tasks.register('generateDdlParser', JavaExec) {
dependsOn 'generateQqlLexer'
group = "QQL"
description = "Generates DDL parser via java_cup library"
classpath = configurations.qqlParserGenerator
main = "java_cup.Main"
mainClass = "java_cup.Main"
workingDir = "$generatedMainDir/$lexerAndParserPackage"

args = ["-package", lexerAndParserPackage,
Expand All @@ -86,13 +87,13 @@ task generateDdlParser(type: JavaExec, dependsOn: generateQqlLexer) {
.withPropertyName("outputDir")
}

task generateQqlParser(type: JavaExec, dependsOn: [generateDdlParser]) {
tasks.register('generateQqlParser', JavaExec) {
dependsOn 'generateQqlLexer', 'generateDdlParser'
group = "QQL"
description = "Generates QQL parser via java_cup library"
classpath = configurations.qqlParserGenerator
main = "java_cup.Main"
mainClass = "java_cup.Main"
workingDir = "$generatedMainDir/$lexerAndParserPackage"

args = ["-package", lexerAndParserPackage,
"-parser", "Parser",
"-symbols", "Symbols",
Expand All @@ -107,5 +108,9 @@ task generateQqlParser(type: JavaExec, dependsOn: [generateDdlParser]) {
.withPropertyName("outputDir")
}

processResources.dependsOn generateQqlParser
compileJava.dependsOn generateQqlParser
tasks.named('processResources') {
dependsOn 'generateQqlParser'
}
tasks.named('compileJava') {
dependsOn 'generateQqlParser'
}
37 changes: 4 additions & 33 deletions java/timebase/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ task prepareFilesForDocker {
dependsOn copyTimebaseServerContainerDependensies
}

task copyMonitorWebapp(type: Copy) {
tasks.register('copyMonitorWebapp', Copy) {
outputs.file(sourceSets.main.output.resourcesDir.absolutePath + '/webapp/timebase-webmonitor.war')

description 'Copy timebase monitor webapp war file into timebase server resources'
dependsOn ':java:timebase:webmonitor:war'
mustRunAfter processResources
Expand All @@ -141,35 +143,4 @@ task copyMonitorWebapp(type: Copy) {
into sourceSets.main.output.resourcesDir.absolutePath + '/webapp'
}

jar.dependsOn copyMonitorWebapp

//
//def generatedMainDir = file('build/generated-src/main/src')
//def lexerAndParserPackage = "com/epam/deltix/qsrv/hf/tickdb/lang/parser"
//def lexerAndParserDir = file("src/main/java/com/epam/deltix/qsrv/hf/tickdb/lang/parser")
//
//sourceSets.main.java.srcDirs generatedMainDir
//
//task generateQqlLexer(type: JavaExec) {
// group = "QQL"
// description = "Generates QQL lexer via flex library"
// classpath = configurations.compileOnly
// main = "JFlex.Main"
// workingDir = lexerAndParserDir
// args = ["qql.flex", "-d", "$generatedMainDir/$lexerAndParserPackage"]
//}
//
//task generateQqlParser(type: JavaExec, dependsOn: generateQqlLexer) {
// group = "QQL"
// description = "Generates QQL parser via java_cup library"
// classpath = configurations.compile
// main = "java_cup.Main"
// workingDir = "$generatedMainDir/$lexerAndParserPackage"
// args = ["-package", lexerAndParserPackage,
// "-parser", "Parser",
// "-symbols", "Symbols",
// "$lexerAndParserDir/qql.cup"
// ]
//}
//
//compileJava.dependsOn generateQqlParser
//jar.dependsOn copyMonitorWebapp
Loading