/* * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. * * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. */ plugins { id 'java' id 'opensearch.build' } ext.licenseFile = file("LICENSE") ext.noticeFile = file("NOTICE") dependencies { api "junit:junit:${versions.junit}" // missing classes in thirdparty audit api 'org.hamcrest:hamcrest-core:1.3' jdkJarHell 'org.opensearch:opensearch-core:current' } repositories { /** * Local test repo contains dummy jars with different group names and versions. * - broken-log4j creates a log4j logger but has no pom, so the class will be missing * - dummy-io has a class that creates a new java.io.File ( something which third-party-audit-absurd.txt forbids ) * - version 0.0.2 has the same class and one extra file just to make the jar different * - used for propagating jar containing jdkjarhell jar from integ test runtime classpath */ maven { name = "local-test" url = file("sample_jars/build/testrepo") metadataSources { artifact() } } mavenCentral() } repositories { /** * Local test repo contains jdkjarhell jar from integ test runtime classpath propagated at runtime */ maven { name = "local-test" url = file("sample_jars/build/testrepo") metadataSources { artifact() } } mavenCentral() } // todo remove offending rules tasks.named('forbiddenApisMain').configure { onlyIf { false } } tasks.named('forbiddenApisTest').configure { onlyIf { false } } // requires dependency on testing fw jarHell.enabled = false // we don't have tests for now test.enabled = false thirdPartyAudit.enabled = false // This requires an additional Jar not part of build-tools loggerUsageCheck.enabled = false // TODO: shouldn't be part of BuildPlugin, should be tested separately validateNebulaPom.enabled = false tasks.register("hello") { doFirst { println "build plugin can be applied" } }