Skip to content

Commit

Permalink
Java 16 support (#1579)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilgreenbird committed May 12, 2021
1 parent a71834c commit 1f550f1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions azure-pipelines.yml
Expand Up @@ -40,15 +40,15 @@ jobs:
inputs:
secureFile: 'mssql-jdbc_auth-9.3.1.x64-preview.dll'
- task: Maven@3
displayName: 'Maven build jre15'
displayName: 'Maven build jre16'
inputs:
mavenPomFile: 'pom.xml'
goals: 'clean dependency:purge-local-repository -DdllPath=$(Agent.TempDirectory) -Dmssql_jdbc_test_connection_properties=jdbc:sqlserver://$(Target_SQL)$(server_domain);$(database);$(user);$(password); install -Pjre15 -DuserNTLM=$(userNTLM) -DpasswordNTLM=$(passwordNTLM) -DdomainNTLM=$(domainNTLM) -DexcludedGroups=$(Ex_Groups) -Dpkcs12_truststore_password=$(pkcs12_truststore_password) -Dpkcs12_truststore=$(pkcs12_truststore.secureFilePath)
goals: 'clean dependency:purge-local-repository -DdllPath=$(Agent.TempDirectory) -Dmssql_jdbc_test_connection_properties=jdbc:sqlserver://$(Target_SQL)$(server_domain);$(database);$(user);$(password); install -Pjre16 -DuserNTLM=$(userNTLM) -DpasswordNTLM=$(passwordNTLM) -DdomainNTLM=$(domainNTLM) -DexcludedGroups=$(Ex_Groups) -Dpkcs12_truststore_password=$(pkcs12_truststore_password) -Dpkcs12_truststore=$(pkcs12_truststore.secureFilePath)
-DapplicationClientID=$(applicationClientID) -DapplicationKey=$(applicationKey) -DtenantID=$(tenantID) -DkeyID=$(keyID) -DwindowsKeyPath=$(windowsKeyPath) -DenclaveAttestationUrl=$(enclaveAttestationUrl) -DenclaveAttestationProtocol=$(enclaveAttestationProtocol) -DenclaveServer=$(enclaveServer)'
testResultsFiles: '**/TEST-*.xml'
testRunTitle: 'Maven build jre15'
testRunTitle: 'Maven build jre16'
javaHomeOption: Path
jdkDirectory: $(JDK15)
jdkDirectory: $(JDK16)
- task: Maven@3
displayName: 'Maven build jre11'
inputs:
Expand All @@ -58,7 +58,7 @@ jobs:
testResultsFiles: '**/TEST-*.xml'
testRunTitle: 'Maven build jre11'
javaHomeOption: Path
jdkDirectory: $(JDK15)
jdkDirectory: $(JDK16)
- task: Maven@3
displayName: 'Maven build jre8'
inputs:
Expand All @@ -68,4 +68,4 @@ jobs:
testResultsFiles: '**/TEST-*.xml'
testRunTitle: 'Maven build jre8'
javaHomeOption: Path
jdkDirectory: $(JDK15)
jdkDirectory: $(JDK16)
12 changes: 6 additions & 6 deletions build.gradle
Expand Up @@ -3,8 +3,8 @@
****************************************************************
* Instruction for Building JDBC Driver:
* For building particular version of the driver, use commands:
* jre15 - - PS> gradle build
PS> gradle build -PbuildProfile=jre15
* jre16 - - PS> gradle build
PS> gradle build -PbuildProfile=jre16
* jre11 - - PS> gradle build -PbuildProfile=jre11
* jre8 - - PS> gradle build -PbuildProfile=jre8
*
Expand Down Expand Up @@ -35,17 +35,17 @@ test {
}
}

if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile == "jre15")){
if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile == "jre16")){

jreVersion = "jre15"
jreVersion = "jre16"
excludedFile = 'com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java'
jar {
manifest {
attributes 'Automatic-Module-Name': 'com.microsoft.sqlserver.jdbc'
}
}
sourceCompatibility = 15
targetCompatibility = 15
sourceCompatibility = 16
targetCompatibility = 16
}

if (hasProperty('buildProfile') && buildProfile == "jre11"){
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Expand Up @@ -322,12 +322,12 @@
</build>
</profile>
<profile>
<id>jre15</id>
<id>jre16</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<finalName>${project.artifactId}-${project.version}.jre15${releaseExt}</finalName>
<finalName>${project.artifactId}-${project.version}.jre16${releaseExt}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -337,8 +337,8 @@
<excludes>
<exclude>**/com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java</exclude>
</excludes>
<source>15</source>
<target>15</target>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 1f550f1

Please sign in to comment.