blob: 7edcb58575df4dc2cc9488b69d968055cd915731 [file]
/*
* 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.
*/
apply from: "$rootDir/buildscripts/java-core.gradle"
apply from: "$rootDir/buildscripts/publishing.gradle"
apply from: "$rootDir/buildscripts/java-junit5.gradle"
apply from: "$rootDir/buildscripts/java-integration-test.gradle"
description = 'ignite-examples'
// Create deployment unit JAR from compiled classes (no file movement needed)
// This JAR includes all Job classes and resources needed for deployment
tasks.register('deploymentUnitJar', Jar) {
dependsOn compileJava
group = 'build'
archiveBaseName = 'deploymentunit-example'
archiveVersion = '1.0.0'
// Include all compiled Job classes and related deployment code
from(sourceSets.main.output.classesDirs) {
include 'org/apache/ignite/example/**/*Job.class'
include 'org/apache/ignite/example/**/*Job$*.class'
include 'org/apache/ignite/example/**/*Receiver.class'
include 'org/apache/ignite/example/**/*Receiver$*.class'
include 'org/apache/ignite/example/**/Compute*Example.class'
include 'org/apache/ignite/example/**/Compute*Example$*.class'
include 'org/apache/ignite/example/**/Distributed*Example.class'
include 'org/apache/ignite/example/**/Distributed*Example$*.class'
include 'org/apache/ignite/example/streaming/Account.class'
include 'org/apache/ignite/example/table/Person.class'
// Include all serialization support classes (Args, Results, Marshallers)
include 'org/apache/ignite/example/serialization/AutoSerializableArg.class'
include 'org/apache/ignite/example/serialization/AutoSerializableResult.class'
include 'org/apache/ignite/example/serialization/JsonArg.class'
include 'org/apache/ignite/example/serialization/JsonResult.class'
include 'org/apache/ignite/example/serialization/JsonArgMarshaller.class'
include 'org/apache/ignite/example/serialization/JsonResultMarshaller.class'
}
// Include resources needed by deployment unit from source
from(sourceSets.main.resources.srcDirs) {
include 'org/apache/ignite/example/code/deployment/resources/**'
}
}
// Embed the deployment unit JAR as a classpath resource so examples can load it
// via getResourceAsStream regardless of the runner (Gradle, IntelliJ, etc.).
processResources {
into('units') {
from deploymentUnitJar
}
}
dependencies {
implementation project(':ignite-runner')
implementation project(':ignite-client')
implementation project(':ignite-jdbc')
implementation project(':ignite-api')
implementation platform(libs.jackson.bom)
implementation libs.jackson.core
implementation libs.jackson.databind
implementation libs.awaitility
testImplementation project(':ignite-core')
integrationTestImplementation project(':ignite-core')
integrationTestImplementation project(':ignite-api')
integrationTestImplementation project(':ignite-runner')
integrationTestImplementation project(':ignite-storage-page-memory')
integrationTestImplementation project(':ignite-storage-api')
integrationTestImplementation project(':ignite-page-memory')
integrationTestImplementation project(':ignite-storage-rocksdb')
integrationTestImplementation project(':ignite-configuration')
integrationTestImplementation testFixtures(project(':ignite-core'))
}