Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…i-tools into constraint_b_o

# Conflicts:
#	openapi-bal-service/src/main/java/io/ballerina/openapi/converter/diagnostic/DiagnosticMessages.java
#	openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
#	openapi-cli/src/test/resources/testng.xml
  • Loading branch information
lnash94 committed Aug 21, 2023
2 parents 75a19b1 + 6860f7e commit bada06f
Show file tree
Hide file tree
Showing 858 changed files with 275,224 additions and 7,738 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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# See: https://help.github.com/articles/about-codeowners/

# These owners will be the default owners for everything in the repo.
* @hevayo @indikasampath2000 @aneeshafedo @lnash94
* @hevayo @nipunaranasinghe @lnash94
4 changes: 2 additions & 2 deletions .github/workflows/build-timestamped-master.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.0.7
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
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 @@ -9,11 +9,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: 'adopt'
java-version: 11
java-version: 17.0.7
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish artifact
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 @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11.0.7
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11
java-version: 17.0.7
- name: Set version env variable
run: echo "VERSION=$((grep -w "version" | cut -d= -f2) < gradle.properties | rev | cut --complement -d- -f1 | rev)" >> $GITHUB_ENV
- name: Pre release depenency version update
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 @@ -15,11 +15,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11.0.7
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11
java-version: 17.0.7
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand All @@ -36,11 +36,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11.0.7
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11
java-version: 17.0.7
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The `openapi` command in Ballerina is used for OpenAPI to Ballerina and Ballerin
The OpenAPI compiler plugin will allow you to validate a service implementation against an OpenAPI contract during
compile time.
This plugin ensures that the implementation of a service does not deviate from its OpenAPI contract.
For more information on the supported operations, go to [Using the OpenAPI Tools](https://ballerina.io/swan-lake/learn/using-the-openapi-tools/)
For more information on the supported operations, go to [Using the OpenAPI Tools](https://ballerina.io/learn/openapi-tool/)
## Building from the Source

### Setting Up the Prerequisites
Expand Down Expand Up @@ -68,7 +68,7 @@ All contributors are encouraged to read the [Ballerina Code of Conduct](https://
## Useful Links

* Discuss about code changes of the Ballerina project in [[email protected]](mailto:[email protected]).
* Chat live with us via our [Slack channel](https://ballerina.io/community/slack/).
* Chat live with us via our [Discord server](https://discord.gg/ballerinalang).
* Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag.
* View the [Ballerina performance test results](https://github.com/ballerina-platform/ballerina-lang/blob/master/performance/benchmarks/summary.md).

40 changes: 22 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@
plugins {
id "base"
id 'maven-publish'
id "com.github.spotbugs" version "4.0.5"
id "com.github.johnrengelman.shadow" version "5.2.0"
id "de.undercouch.download" version "4.0.4"
id "com.github.spotbugs" version "5.0.14"
id "com.github.johnrengelman.shadow" version "8.1.1"
id "de.undercouch.download" version "5.4.0"
id "net.researchgate.release" version "2.8.0"
id 'org.javamodularity.moduleplugin' version '1.7.0' apply false
id "org.sonarqube" version "4.0.0.2929"
}

apply plugin: 'java'
apply plugin: "com.github.spotbugs"
apply plugin: 'jacoco'
apply plugin: "org.javamodularity.moduleplugin"
apply from: "$rootDir/gradle/javaProject.gradle"

ext.ballerinaLangVersion = project.ballerinaLangVersion
ext.testngVersion = project.testngVersion
Expand All @@ -54,8 +56,9 @@ ext.stdlibGraphqlVersion = project.stdlibGraphqlVersion
ext.stdlibGrpcVersion = project.stdlibGrpcVersion
ext.stdlibWebsubVersion = project.stdlibWebsubVersion
ext.stdlibConstraintVersion = project.stdlibConstraintVersion
ext.stdlibWebsocketVersion = project.stdlibWebsocketVersion
ext.jacocoVersion = project.jacocoVersion
ext.puppycrawlCheckstyleVersion = "8.18"
ext.puppycrawlCheckstyleVersion = project.puppycrawlCheckstyleVersion

allprojects {
group = 'io.ballerina'
Expand Down Expand Up @@ -92,17 +95,6 @@ allprojects {
url "https://plugins.gradle.org/m2/"
}
}
// Add checkstyles
checkstyle {
toolVersion '8.16'
configFile = file("$rootProject.projectDir/config/checkstyle/checkstyle.xml")
}

def excludePattern = '**/module-info.java'
tasks.withType(Checkstyle) {
configFile file("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
exclude excludePattern
}

ext {
snapshotVersion= '-SNAPSHOT'
Expand Down Expand Up @@ -139,6 +131,7 @@ subprojects {
ballerinaStdLibs "io.ballerina.stdlib:graphql-ballerina:${stdlibGraphqlVersion}"
ballerinaStdLibs "io.ballerina.stdlib:grpc-ballerina:${stdlibGrpcVersion}"
ballerinaStdLibs "io.ballerina.stdlib:websub-ballerina:${stdlibWebsubVersion}"
ballerinaStdLibs "io.ballerina.stdlib:websocket-ballerina:${stdlibWebsocketVersion}"
ballerinaStdLibs "io.ballerina.stdlib:constraint-ballerina:${stdlibConstraintVersion}"

}
Expand Down Expand Up @@ -168,16 +161,19 @@ tasks.withType(JavaCompile) {
}
task codeCoverageReport(type: JacocoReport) {
dependsOn = subprojects.test
dependsOn(":test")
dependsOn(":openapi-extension-tests:jacocoTestReport")
dependsOn(":openapi-integration-tests:jacocoTestReport")

executionData fileTree(project.rootDir.absolutePath).include("**/build/coverage-reports/*.exec")

subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.enabled = true
html.enabled = true
csv.enabled = true
xml.required = true
html.required = true
csv.required = true
xml.destination = new File("${buildDir}/reports/jacoco/report.xml")
html.destination = new File("${buildDir}/reports/jacoco/report.html")
csv.destination = new File("${buildDir}/reports/jacoco/report.csv")
Expand All @@ -188,3 +184,11 @@ task codeCoverageReport(type: JacocoReport) {
}
}

sonar {
properties {
property "sonar.projectKey", "ballerina-platform_openapi-tools"
property "sonar.organization", "ballerina-platform"
property "sonar.host.url", "https://sonarcloud.io"
}
}

14 changes: 7 additions & 7 deletions config/checkstyle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ plugins {
id "de.undercouch.download"
}

task downloadMultipleFiles(type: Download) {
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 All @@ -37,10 +37,10 @@ clean {
enabled = false
}

artifacts.add('default', file("${rootDir}/config/checkstyle/checkstyle.xml")) {
builtBy('downloadMultipleFiles')
artifacts.add('default', file("$project.buildDir/checkstyle.xml")) {
builtBy('downloadCheckstyleRuleFiles')
}

artifacts.add('default', file("${rootDir}/config/checkstyle/suppressions.xml")) {
builtBy('downloadMultipleFiles')
artifacts.add('default', file("$project.buildDir/suppressions.xml")) {
builtBy('downloadCheckstyleRuleFiles')
}
75 changes: 45 additions & 30 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,40 +1,55 @@
org.gradle.caching=true
group=io.ballerina
version=1.2.0-SNAPSHOT
version=1.8.0-SNAPSHOT

#dependency
ballerinaLangVersion=2201.2.0-20220714-175300-1f0ead80
testngVersion=7.4.0
ballerinaLangVersion=2201.8.0-20230816-121900-c1174ddd
testngVersion=7.6.1
slf4jVersion=1.7.30
org.gradle.jvmargs=-Xmx4096M
org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8
commonsLang3Version=3.9
commonsIoVersion=2.6
netLingalaZip4jVersion=2.8.0
jacocoVersion=0.8.6

#stdlib
stdlibIoVersion=1.2.2
stdlibRegexVersion=1.3.0
stdlibFileVersion=1.3.0
stdlibOsVersion=1.3.0
stdlibLogVersion=2.3.0
stdlibMimeVersion=2.3.0
stdlibCryptoVersion=2.2.2
stdlibAuthVersion=2.3.0
stdlibHttpVersion=2.3.1-20220715-183500-7edae09
stdlibTimeVersion=2.2.2
stdlibTaskVersion=2.2.2
stdlibCacheVersion=3.2.2
stdlibJwtVersion=2.3.0
stdlibOAuth2Version=2.3.0
stdlibUuidVersion=1.3.0
stdlibUrlVersion=2.2.2
stdlibXmldataVersion=2.2.2
stdlibGraphqlVersion=1.3.1
stdlibGrpcVersion=1.3.0
stdlibWebsubVersion=2.3.0
stdlibConstraintVersion=1.0.0-20220711-153400-5cab109
jacocoVersion=0.8.10
swaggerParserVersion=2.1.16
puppycrawlCheckstyleVersion = 10.12.1

# Stdlib Level 01
stdlibIoVersion=1.5.0
stdlibRegexVersion=1.4.3
stdlibTimeVersion=2.3.0
stdlibUrlVersion=2.3.0
stdlibXmldataVersion=2.6.0

# Stdlib Level 02
stdlibConstraintVersion=1.3.0
stdlibCryptoVersion=2.4.0
stdlibLogVersion=2.8.1-20230718-085900-36c385c
stdlibOsVersion=1.7.0
stdlibTaskVersion=2.4.0

# Stdlib Level 03
stdlibCacheVersion=3.6.0
stdlibFileVersion=1.8.0
stdlibMimeVersion=2.8.0
stdlibUuidVersion=1.6.0

# Stdlib Level 04
stdlibAuthVersion=2.9.0
stdlibJwtVersion=2.9.0
stdlibOAuth2Version=2.9.0

# Stdlib Level 05
stdlibHttpVersion=2.10.0-20230809-150400-0c9cad9

# Stdlib Level 06
stdlibGrpcVersion=1.9.1-20230809-211700-feffbef
stdlibWebsocketVersion=2.9.1-20230809-174700-6942521
stdlibWebsubVersion=2.9.1-20230809-211400-c6c75d2

# Stdlib Level 07
stdlibGraphqlVersion=1.10.0-20230809-214800-d775b0d

# Ballerinax Observer
observeVersion=1.0.4
observeInternalVersion=1.0.3
observeVersion=1.1.0
observeInternalVersion=1.1.0
Loading

0 comments on commit bada06f

Please sign in to comment.