Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/j17' into j17
Browse files Browse the repository at this point in the history
# Conflicts:
#	ballerina/Dependencies.toml
  • Loading branch information
kaneeldias committed Aug 15, 2023
2 parents c2be51d + 99f1484 commit 8703d99
Show file tree
Hide file tree
Showing 26 changed files with 273 additions and 193 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure all Java files use LF.
*.java eol=lf
4 changes: 2 additions & 2 deletions .github/workflows/build-timestamped-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
if: github.repository_owner == 'ballerina-platform'
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17.0.7
- name: Change to Timestamped Version
run: |
startTime=$(TZ="Asia/Kolkata" date +'%Y%m%d-%H%M00')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/central-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
if: github.repository_owner == 'ballerina-platform'
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17.0.7
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17.0.7

- name: Set environment variable
if: github.event.action == 'check_connector_for_breaking_changes'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
if: github.repository_owner == 'ballerina-platform'
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17.0.7
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17.0.7
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand All @@ -32,11 +32,11 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17.0.7
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17.0.7
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ Follow one of the following ways to add the JARs in the file:

* Download the JAR and update the path.
```
[[platform.java11.dependency]]
[[platform.java17.dependency]]
path = "PATH"
```

* Add JAR with the Maven dependency params.
```
[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "com.oracle.database.jdbc"
artifactId = "ojdbc8"
artifactId = "ojdbc11"
version = "12.2.0.1"
[platform.java11.dependency]]
[platform.java17.dependency]]
groupId = "com.oracle.database.xml"
artifactId = "xdb"
version = "21.1.0.0"
[platform.java11.dependency]]
[platform.java17.dependency]]
groupId = "com.oracle.database.xml"
artifactId = "xmlparserv2"
version = "12.2.0.1"
Expand Down Expand Up @@ -559,8 +559,8 @@ This repository only contains the source code for the package.

### Set up the prerequisites

1. Download and install the Java SE Development Kit (JDK) version 11 (from one of the following locations).
* [Oracle](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)
1. Download and install the Java SE Development Kit (JDK) version 17 (from one of the following locations).
* [Oracle](https://www.oracle.com/java/technologies/downloads/)
* [OpenJDK](https://adoptium.net/)

2. Download and install [Docker](https://www.docker.com/get-started).
Expand Down
12 changes: 6 additions & 6 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[package]
org = "ballerinax"
name = "oracledb"
version = "1.10.0"
version = "1.10.1"
authors = ["Ballerina"]
keywords = ["database", "client", "network", "SQL", "RDBMS", "OracleDB", "Oracle"]
repository = "https://github.com/ballerina-platform/module-ballerinax-oracledb"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.7.0"

[platform.java11]
[platform.java17]
graalvmCompatible = true

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "oracledb-native"
version = "1.10.0"
path = "../native/build/libs/oracledb-native-1.10.0.jar"
version = "1.10.1"
path = "../native/build/libs/oracledb-native-1.10.1-SNAPSHOT.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "sql-native"
version = "1.10.0"
Expand Down
2 changes: 1 addition & 1 deletion ballerina/CompilerPlugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ id = "oracledb-compiler-plugin"
class = "io.ballerina.stdlib.oracledb.compiler.OracleDBCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/oracledb-compiler-plugin-1.10.0.jar"
path = "../compiler-plugin/build/libs/oracledb-compiler-plugin-1.10.1-SNAPSHOT.jar"
10 changes: 5 additions & 5 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ Follow one of the following ways to add the JARs in the file:

* Download the JAR and update the path.
```
[[platform.java11.dependency]]
[[platform.java17.dependency]]
path = "PATH"
```

* Add JAR with the Maven dependency params.
```
[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "com.oracle.database.jdbc"
artifactId = "ojdbc8"
artifactId = "ojdbc11"
version = "12.2.0.1"
[platform.java11.dependency]]
[platform.java17.dependency]]
groupId = "com.oracle.database.xml"
artifactId = "xdb"
version = "21.1.0.0"
[platform.java11.dependency]]
[platform.java17.dependency]]
groupId = "com.oracle.database.xml"
artifactId = "xmlparserv2"
version = "12.2.0.1"
Expand Down
10 changes: 5 additions & 5 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ Follow one of the following ways to add the JARs in the file:

* Download the JAR and update the path.
```
[[platform.java11.dependency]]
[[platform.java17.dependency]]
path = "PATH"
```

* Add JAR with the Maven dependency params.
```
[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "com.oracle.database.jdbc"
artifactId = "ojdbc8"
artifactId = "ojdbc11"
version = "12.2.0.1"
[platform.java11.dependency]]
[platform.java17.dependency]]
groupId = "com.oracle.database.xml"
artifactId = "xdb"
version = "21.1.0.0"
[platform.java11.dependency]]
[platform.java17.dependency]]
groupId = "com.oracle.database.xml"
artifactId = "xmlparserv2"
version = "12.2.0.1"
Expand Down
6 changes: 3 additions & 3 deletions ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ publishing {

def checkExecResult(execResult, failText, standardOutput) {
if (execResult) {
if (execResult.getExitValue() != 0) {
throw new GradleException('Non-zero exit value: ' + execResult.getExitValue())
if (execResult.get().getExitValue() != 0) {
throw new GradleException('Non-zero exit value: ' + execResult.get().getExitValue())
}
if (standardOutput.toString().contains(failText)) {
throw new GradleException('"' + failText + '" string in output: ' + standardOutput.toString())
Expand All @@ -139,7 +139,7 @@ task createTestDockerImage(type: Exec) {
commandLine 'sh', '-c', "docker build -f $project.projectDir/tests/resources/Dockerfile -t ballerina-oracledb" +
" -q $project.projectDir/tests/resources/"
doLast {
checkExecResult(execResult, 'Error', standardOutput)
checkExecResult(executionResult, 'Error', standardOutput)
sleep(5 * 1000)
}
}
Expand Down
4 changes: 2 additions & 2 deletions build-config/checkstyle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ apply plugin: 'java'

task downloadCheckstyleRuleFiles(type: Download) {
src([
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.3/checkstyle/checkstyle.xml',
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.3/checkstyle/suppressions.xml'
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.4/checkstyle/jdk-17/checkstyle.xml',
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.4/checkstyle/jdk-17/suppressions.xml'
])
overwrite false
onlyIfNewer true
Expand Down
6 changes: 3 additions & 3 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.8.0"

[platform.java11]
[platform.java17]
graalvmCompatible = true

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "oracledb-native"
version = "@toml.version@"
path = "../native/build/libs/oracledb-native-@project.version@.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "sql-native"
version = "@sql.version@"
Expand Down
10 changes: 10 additions & 0 deletions build-config/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,14 @@
~ under the License.
-->
<FindBugsFilter>
<Match>
<Class name="io.ballerina.stdlib.oracledb.parameterprocessor.OracleDBResultParameterProcessor"/>
<Method name="getBalStreamResultIterator"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
<Match>
<Class name="io.ballerina.stdlib.oracledb.parameterprocessor.OracleDBStatementParameterProcessor"/>
<Method name="getInstance"/>
<Bug pattern="MS_EXPOSE_REP"/>
</Match>
</FindBugsFilter>
6 changes: 3 additions & 3 deletions compiler-plugin-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {
checkstyle project(':checkstyle')
checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}"

jacocoRuntime "org.jacoco:org.jacoco.agent:0.8.6:runtime"
jacocoRuntime "org.jacoco:org.jacoco.agent:0.8.10:runtime"

implementation project(':oracledb-compiler-plugin')

Expand All @@ -48,7 +48,7 @@ tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

sourceCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17

test {
systemProperty "ballerina.offline.flag", "true"
Expand All @@ -73,7 +73,7 @@ test {
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
xml.required = true
}
sourceSets project(':oracledb-compiler-plugin').sourceSets.main
}
Expand Down
18 changes: 9 additions & 9 deletions examples/online-shop/Working with an Oracle Database.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,37 @@ These are HTTP RESTful services used to insert, create, and retrieve data of a s

* *Adding the oracledb JDBC thin driver and their dependencies*

* Download and add the OracleDB thin driver `ojdbc8.jar` along with the `xdb.jar` and `xmlparserv2.jar` files as native
* Download and add the OracleDB thin driver `ojdbc11.jar` along with the `xdb.jar` and `xmlparserv2.jar` files as native
library dependencies in the example Ballerina project's `Ballerina.toml` file. It is recommended to use an Oracle
thin driver `ojdbc8.jar` version greater than 12.2.0.1. As per the existing `Ballerina.toml` file, it points to
thin driver `ojdbc11.jar` version greater than 21.1.0.0. As per the existing `Ballerina.toml` file, it points to
those dependencies in the `ballerina` folder. You may have to download those dependencies and update the `Ballerina.toml`
file.

Follow one of the ways below to add the JAR in the file:

* Download the JAR files and update the path.
```
[[platform.java11.dependency]]
[[platform.java17.dependency]]
path = "PATH"
```
or

* Add the JAR with the Maven dependency params.
```
[platform.java11.dependency]]
[platform.java17.dependency]]
groupId = "com.oracle.database.jdbc"
artifactId = "ojdbc8"
version = "12.2.0.1"
artifactId = "ojdbc11"
version = "21.1.0.0"
[platform.java11.dependency]]
[platform.java17.dependency]]
groupId = "com.oracle.database.xml"
artifactId = "xdb"
version = "21.1.0.0"
[platform.java11.dependency]]
[platform.java17.dependency]]
groupId = "com.oracle.database.xml"
artifactId = "xmlparserv2"
version = "12.2.0.1"
version = "21.1.0.0"
```

* *Initial schema, table creation, and data insertion*
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
group=io.ballerina.stdlib
version=1.11.0-SNAPSHOT

puppycrawlCheckstyleVersion=8.18
oracleDBDriverVersion=12.2.0.1
checkstyleToolVersion=7.8.2
githubSpotbugsVersion=4.0.5
githubJohnrengelmanShadowVersion=5.2.0
underCouchDownloadVersion=4.0.4
puppycrawlCheckstyleVersion=10.12.1
oracleDBDriverVersion=23.2.0.0
checkstyleToolVersion=10.12.1
githubSpotbugsVersion=5.0.14
githubJohnrengelmanShadowVersion=8.1.1
underCouchDownloadVersion=5.4.0
researchgateReleaseVersion=2.8.0
testngVersion=7.4.0
testngVersion=7.6.1
ballerinaGradlePluginVersion=2.0.1

ballerinaLangVersion=2201.8.0-20230726-145300-b2bdf796
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Loading

0 comments on commit 8703d99

Please sign in to comment.