/** * 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. */ import com.github.davidmc24.gradle.plugin.avro.GenerateAvroJavaTask description = 'Fineract Avro Schemas' apply plugin: 'com.github.davidmc24.gradle.plugin.avro-base' apply from: 'dependencies.gradle' // TODO: @vidakovic we should publish this lib to Maven Central; do in separate PR task buildJavaSdk(type: GenerateAvroJavaTask) { source("$projectDir/src/main/avro") outputDir = file("$buildDir/generated/java/src/main/java") } compileJava.dependsOn(buildJavaSdk, licenseFormatMain, spotlessMiscApply) java { // keep this at Java 8, not 17 sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } tasks.withType(JavaCompile) { options.compilerArgs -= ["-Werror"] } configurations { generatedCompileClasspath.extendsFrom implementation generatedRuntimeClasspath.extendsFrom runtimeClasspath } test { useJUnitPlatform() } sourceSets.main.java.srcDir new File(buildDir, "generated/java/src/main/java") licenseFormatMain.dependsOn buildJavaSdk licenseMain.dependsOn buildJavaSdk