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 all commits
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

29 changes: 21 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
Expand All @@ -19,5 +13,24 @@
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Gradle ###
.gradle
build/
gradle-app.setting
!gradle-wrapper.jar
.gradletasknamecache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store

### Generated Files ###
target/
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 = "lib/wsdl-cli-@toml.version@.jar"

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

[[dependency]]
path = "lib/wsdl4j-@wsdl4j-version@.jar"

[[dependency]]
path = "lib/XmlSchema-@xmlschema-version@.jar"
12 changes: 12 additions & 0 deletions build-config/resources/package/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
distribution = "2201.9.0"
org = "ballerina"
name = "wsdltool"
version = "@toml.version@"
authors = ["Ballerina"]
keywords = ["wsdl"]
repository = "https://github.com/ballerina-platform/wsdl-tools"
license = ["Apache-2.0"]

[build-options]
observabilityIncluded = false
94 changes: 94 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* 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" version "${spotbugsPluginVersion}"
id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}"
id "de.undercouch.download" version "${downloadPluginVersion}"
id "net.researchgate.release" version "${releasePluginVersion}"
}

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.*\$'
}
}

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

release {
failOnPublishNeeded = false
failOnSnapshotDependencies = true

buildTasks = ['build']
versionPropertyFile = 'gradle.properties'
tagTemplate = 'v$version'

git {
requireBranch = "release-${moduleVersion}"
pushToRemote = 'origin'
}
}

tasks.register('clean') {
dependsOn(":module-ballerina-wsdl:clean")
}

tasks.register('build') {
dependsOn(":module-ballerina-wsdl:build")
}

//publishToMavenLocal.dependsOn build
//publish.dependsOn build
Comment on lines +93 to +94

Choose a reason for hiding this comment

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

If we don't need this dependency, can remove

17 changes: 17 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
org.gradle.caching=true
group=io.ballerina
version=0.1.1-SNAPSHOT

# Dependencies
ballerinaLangVersion=2201.9.0
checkstylePluginVersion=10.12.0
spotbugsPluginVersion=5.0.14
shadowJarPluginVersion=8.1.1
downloadPluginVersion=5.4.0
releasePluginVersion=2.8.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