AwsEncryptionSDK/runtimes/java/build.gradle.kts (56 lines of code) (raw):

/* * This file was generated by the Gradle 'init' task. * * This generated file contains a sample Java library project to get you started. * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle * User Manual available at https://docs.gradle.org/8.1.1/userguide/building_java_projects.html */ import java.io.File import java.io.FileInputStream import java.util.Properties plugins { // Apply the java-library plugin for API and implementation separation. `java-library` `maven-publish` } var props = Properties().apply { load(FileInputStream(File(rootProject.rootDir, "../../../project.properties"))) } var mplVersion = props.getProperty("mplDependencyJavaVersion") group = "software.amazon.cryptography" version = "1.0.0-SNAPSHOT" description = "AwsEncryptionSdk" repositories { // Use Maven Central for resolving dependencies. mavenCentral() mavenLocal() } dependencies { implementation("org.dafny:DafnyRuntime:4.9.0") implementation("software.amazon.smithy.dafny:conversion:0.1") implementation("software.amazon.cryptography:aws-cryptographic-material-providers:${mplVersion}") // Use JUnit test framework. testImplementation("junit:junit:4.13.2") // This dependency is exported to consumers, that is to say found on their compile classpath. api("org.apache.commons:commons-math3:3.6.1") // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation("com.google.guava:guava:31.1-jre") } // Apply a specific Java toolchain to ease working on different environments. java { toolchain.languageVersion.set(JavaLanguageVersion.of(8)) sourceSets["main"].java { mainSourceSet() } sourceSets["test"].java { srcDir("src/test") } } tasks { register("runTests", JavaExec::class.java) { mainClass.set("TestsFromDafny") classpath = sourceSets["test"].runtimeClasspath } } fun SourceDirectorySet.mainSourceSet() { srcDir("src/main/java") srcDir("src/main/dafny-generated") srcDir("src/main/smithy-generated") } publishing { publications.create<MavenPublication>("mavenLocal") { groupId = "software.amazon.cryptography" artifactId = "aws-encryption-sdk" from(components["java"]) } repositories { mavenLocal() } }