1- allprojects {
2- group = ' com.microsoft'
3- version = ' 1.5.0'
4- }
1+ /*
2+ * This build file was generated by the Gradle 'init' task.
3+ *
4+ * This generated file contains a sample Java project to get you started.
5+ * For more details take a look at the Java Quickstart chapter in the Gradle
6+ * user guide available at https://docs.gradle.org/4.4.1/userguide/tutorial_java_projects.html
7+ */
8+
9+ plugins {
10+ id ' java'
11+ id ' com.google.protobuf' version ' 0.8.16'
12+ id ' idea'
13+ id ' maven-publish'
14+ id ' signing'
15+ }
16+
17+ archivesBaseName = ' durabletask-azuremanaged'
18+ group ' com.microsoft'
19+ version = ' 1.5.0'
20+
21+ def grpcVersion = ' 1.59.0'
22+ def azureCoreVersion = ' 1.45.0'
23+ def azureIdentityVersion = ' 1.11.1'
24+ // When build on local, you need to set this value to your local jdk11 directory.
25+ // Java11 is used to compile and run all the tests.
26+ def PATH_TO_TEST_JAVA_RUNTIME = System . env. JDK_11 ?: System . getProperty(" java.home" )
27+
28+ repositories {
29+ mavenCentral()
30+ }
31+
32+ dependencies {
33+ implementation project(' :client' )
34+ implementation " io.grpc:grpc-protobuf:${ grpcVersion} "
35+ implementation " io.grpc:grpc-stub:${ grpcVersion} "
36+ runtimeOnly " io.grpc:grpc-netty-shaded:${ grpcVersion} "
37+
38+ implementation " com.azure:azure-core:${ azureCoreVersion} "
39+ implementation " com.azure:azure-identity:${ azureIdentityVersion} "
40+
41+ // Test dependencies
42+ testImplementation ' org.junit.jupiter:junit-jupiter-api:5.10.0'
43+ testImplementation ' org.junit.jupiter:junit-jupiter-params:5.10.0'
44+ testImplementation ' org.mockito:mockito-core:5.3.1'
45+ testImplementation ' org.mockito:mockito-junit-jupiter:5.3.1'
46+ testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.10.0'
47+ }
48+
49+ compileJava {
50+ sourceCompatibility = JavaVersion . VERSION_1_8
51+ targetCompatibility = JavaVersion . VERSION_1_8
52+ }
53+
54+ compileTestJava {
55+ sourceCompatibility = JavaVersion . VERSION_11
56+ targetCompatibility = JavaVersion . VERSION_11
57+ options. fork = true
58+ options. forkOptions. executable = " ${ PATH_TO_TEST_JAVA_RUNTIME} /bin/javac"
59+ }
60+
61+ test {
62+ useJUnitPlatform()
63+ }
64+
65+ publishing {
66+ repositories {
67+ maven {
68+ url " file://$project . rootDir /repo"
69+ }
70+ }
71+ publications {
72+ mavenJava(MavenPublication ) {
73+ from components. java
74+ artifactId = archivesBaseName
75+ pom {
76+ name = ' Durable Task Azure Managed SDK for Java'
77+ description = ' This package contains classes and interfaces for building Durable Task orchestrations in Java using Azure Managed mode.'
78+ url = " https://github.com/microsoft/durabletask-java/tree/main/azuremanaged"
79+ licenses {
80+ license {
81+ name = " MIT License"
82+ url = " https://opensource.org/licenses/MIT"
83+ distribution = " repo"
84+ }
85+ }
86+ developers {
87+ developer {
88+ id = " Microsoft"
89+ name = " Microsoft Corporation"
90+ }
91+ }
92+ scm {
93+ connection = " scm:git:https://github.com/microsoft/durabletask-java"
94+ developerConnection
= " scm:git:[email protected] :microsoft/durabletask-java" 95+ url = " https://github.com/microsoft/durabletask-java/tree/main/azuremanaged"
96+ }
97+ withXml {
98+ project. configurations. compileOnly. allDependencies. each { dependency ->
99+ asNode(). dependencies[0 ]. appendNode(" dependency" ). with {
100+ it. appendNode(" groupId" , dependency. group)
101+ it. appendNode(" artifactId" , dependency. name)
102+ it. appendNode(" version" , dependency. version)
103+ it. appendNode(" scope" , " provided" )
104+ }
105+ }
106+ }
107+ }
108+ }
109+ }
110+ }
111+
112+ java {
113+ withSourcesJar()
114+ withJavadocJar()
115+ }
116+
0 commit comments