Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of WSDL to Ballerina tool #14

Merged
merged 11 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

55 changes: 37 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
# Compiled class file
*.class
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

# Log file
*.log
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

# BlueJ files
*.ctxt
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

# Mobile Tools for Java (J2ME)
.mtj.tmp/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
### VS Code ###
.vscode/

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Mac OS ###
.DS_Store
AzeemMuzammil marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/google-java-format.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# [DEPRICATED] wsdl-tools
# wsdl-tools
Maintain the source code of WSDL to Ballerina Tool
68 changes: 68 additions & 0 deletions build-config/checkstyle/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
///*
// * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Licence should be updated

// *
// * Licensed under the Apache License, Version 2.0 (the "License");
// * you may not use this file except in compliance with the License.
// * You may obtain a copy of the License at
// *
// * http://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is distributed on an "AS IS" BASIS,
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// * See the License for the specific language governing permissions and
// * limitations under the License.
// *
// */
//
//plugins {
AzeemMuzammil marked this conversation as resolved.
Show resolved Hide resolved
// id "de.undercouch.download"
//}
//
//apply plugin: 'java'
//
//task downloadMultipleFiles(type: Download) {
// src([
// '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
// dest buildDir
//}
//
//jar {
// enabled = false
//}
//
//clean {
// enabled = false
//}
//
//artifacts.add('default', file("${rootDir}/build-config/checkstyle/checkstyle.xml")) {
// builtBy('downloadMultipleFiles')
//}
//
//artifacts.add('default', file("${rootDir}/build-config/checkstyle/suppressions.xml")) {
// builtBy('downloadMultipleFiles')
//}

plugins {
id 'java'
}

group = 'org.ballerinalang'
version = '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
}

test {
useJUnitPlatform()
}
AzeemMuzammil marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 14 additions & 0 deletions build-config/resources/package/BalTool.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tool]
id = "wsdl"

[[dependency]]
path = "resources/wsdl-cli-@toml.version@.jar"

[[dependency]]
path = "resources/wsdl-core-@toml.version@.jar"

[[dependency]]
path = "resources/wsdl4j-1.6.3.jar"

[[dependency]]
path = "resources/XmlSchema-1.4.7.jar"
AzeemMuzammil marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions build-config/resources/package/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
org = "ballerina"
name = "wsdltool"
version = "@toml.version@"
authors = ["Ballerina"]
keywords = ["wsdl"]
license = ["Apache-2.0"]
distribution = "2201.9.1"
AzeemMuzammil marked this conversation as resolved.
Show resolved Hide resolved
113 changes: 113 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/*
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com)
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

plugins {
id "com.github.spotbugs-base"
id "com.github.johnrengelman.shadow"
id "de.undercouch.download"
id "net.researchgate.release"
}

ext.ballerinaLangVersion = project.ballerinaLangVersion

def stripBallerinaExtensionVersion(String extVersion) {
if (extVersion.matches(project.ext.timestampedVersionRegex)) {
def splitVersion = extVersion.split('-')
if (splitVersion.length > 3) {
def strippedValues = splitVersion[0..-4]
return strippedValues.join('-')
} else {
return extVersion
}
} else {
return extVersion.replace("${project.ext.snapshotVersion}", "")
}
}

allprojects {
group = project.group
version = project.version

apply plugin: 'jacoco'
apply plugin: 'maven-publish'

repositories {
mavenLocal()
maven {
url = 'https://maven.wso2.org/nexus/content/repositories/releases/'
}
maven {
url = 'https://maven.wso2.org/nexus/content/groups/wso2-public/'
}

maven {
url = 'https://maven.wso2.org/nexus/content/repositories/orgballerinalang-1614'
}

maven {
url = 'https://repo.maven.apache.org/maven2'
}

maven {
url = 'https://maven.pkg.github.com/ballerina-platform/*'
credentials {
username System.getenv("packageUser")
password System.getenv("packagePAT")
}
}

maven {
url "https://plugins.gradle.org/m2/"
}
}

ext {
snapshotVersion= '-SNAPSHOT'
timestampedVersionRegex = '.*-\\d{8}-\\d{6}-\\w.*\$'
}
}

subprojects {

configurations {
ballerinaStdLibs
}

dependencies {
/* Standard libraries */
ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${project.stdlibIoVersion}"
}
}

def moduleVersion = project.version.replace("-SNAPSHOT", "")

task build {
dependsOn ":module-ballerina-wsdl:build"
}

release {
failOnSnapshotDependencies = true
versionPropertyFile = 'gradle.properties'
tagTemplate = 'v${version}'
// git {
// requireBranch = "release-${moduleVersion}"
// pushToRemote = 'origin'
// }
}

publish.dependsOn ":module-ballerina-wsdl:publish"
18 changes: 18 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
org.gradle.caching=true
group=io.ballerina
version=0.1.0-SNAPSHOT

# Dependencies
ballerinaLangVersion=2201.9.1
checkstylePluginVersion=10.12.0
spotbugsPluginVersion=5.0.14
shadowJarPluginVersion=8.1.1
downloadPluginVersion=5.4.0
releasePluginVersion=2.8.0
ballerinaGradlePluginVersion=2.2.0

wsdl4jVersion=1.6.3
apacheXmlSchemaVersion=1.4.7

# Stdlib Level 01
stdlibIoVersion=1.6.0
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading