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

Update directory structure and package names #316

Merged
merged 3 commits into from
Jul 9, 2021
Merged
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
7 changes: 0 additions & 7 deletions .github/workflows/build-timestamped-master.yml
Original file line number Diff line number Diff line change
@@ -36,12 +36,5 @@ jobs:
publishPAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
run: |
./gradlew publish --scan --no-daemon
- name: Archive Error Log
uses: actions/upload-artifact@v2
if: failure()
with:
name: Ballerina Internal Log
path: ftp-ballerina/ballerina-internal.log
if-no-files-found: ignore
- name: Generate CodeCov Report
uses: codecov/codecov-action@v1
7 changes: 0 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -20,13 +20,6 @@ jobs:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build --scan
- name: Archive Error Log
uses: actions/upload-artifact@v2
if: failure()
with:
name: Ballerina Internal Log
path: ftp-ballerina/ballerina-internal.log
if-no-files-found: ignore
- name: Archive Code Coverage JSON
uses: actions/upload-artifact@v2
with:
58 changes: 58 additions & 0 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[package]
org = "ballerina"
name = "ftp"
version = "@toml.version@"

[[platform.java11.dependency]]
path = "./lib/commons-vfs2-@commons.vfs2.version@.jar"

[[platform.java11.dependency]]
path = "./lib/jsch-@jsch.version@.jar"

[[platform.java11.dependency]]
path = "./lib/commons-net-@commons.net.version@.jar"

[[platform.java11.dependency]]
path = "./lib/testng-@testng.version@.jar"

[[platform.java11.dependency]]
path = "./lib/MockFtpServer-@mockftpserver.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/bcprov-jdk15on-@bouncycastle.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/sshd-core-@sshd.core.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/ftpserver-core-@ftpserver.core.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/ftplet-api-@ftplet.api.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/mina-core-@mina.core.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/aopalliance-@aopalliance.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/jcl-over-slf4j-@jcl.slf4j.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/org.wso2.transport.remote-file-system-@wso2.remote.file.system.version@.jar"

[[platform.java11.dependency]]
path = "../native/build/libs/ftp-native-@project.version@.jar"

[[platform.java11.dependency]]
path = "../test-utils/build/libs/ftp-test-utils-@project.version@.jar"
scope = "testOnly"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ftp-ballerina/byte_stream.bal → ballerina/byte_stream.bal
Original file line number Diff line number Diff line change
@@ -70,11 +70,11 @@ class ByteStream {

isolated function externGetStreamEntryRecord(Client entity, string path, int arraySize)
returns record {|byte[] & readonly value;|}|io:Error? = @java:Method {
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient",
'class: "io.ballerina.stdlib.ftp.client.FtpClient",
name: "get"
} external;

isolated function externCloseInputStream(Client entity) returns io:Error? = @java:Method {
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient",
'class: "io.ballerina.stdlib.ftp.client.FtpClient",
name: "closeInputByteStream"
} external;
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -19,67 +19,67 @@ import ballerina/jballerina.java;

isolated function initEndpoint(Client clientEndpoint, map<anydata> config) returns Error? = @java:Method {
name: "initClientEndpoint",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function get(Client clientEndpoint, string path, int arraySize)
returns record {|byte[] value;|}|io:Error? = @java:Method{
name: "get",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function delete(Client clientEndpoint, string path) returns Error? = @java:Method{
name: "delete",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function append(Client clientEndpoint, InputContent inputContent) returns Error? = @java:Method{
name: "append",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function put(Client clientEndpoint, InputContent inputContent) returns Error? = @java:Method{
name: "put",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function mkdir(Client clientEndpoint, string path) returns Error? = @java:Method{
name: "mkdir",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function rmdir(Client clientEndpoint, string path) returns Error? = @java:Method{
name: "rmdir",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function rename(Client clientEndpoint, string origin, string destination) returns Error? = @java:Method{
name: "rename",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function size(Client clientEndpoint, string path) returns int|Error = @java:Method{
name: "size",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function list(Client clientEndpoint, string path) returns FileInfo[]|Error = @java:Method{
name: "list",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function isDirectory(Client clientEndpoint, string path) returns boolean|Error = @java:Method{
name: "isDirectory",
'class: "org.ballerinalang.stdlib.ftp.client.FtpClient"
'class: "io.ballerina.stdlib.ftp.client.FtpClient"
} external;

isolated function poll(ListenerConfiguration config) returns Error? = @java:Method{
name: "poll",
'class: "org.ballerinalang.stdlib.ftp.server.FtpListenerHelper"
'class: "io.ballerina.stdlib.ftp.server.FtpListenerHelper"
} external;

isolated function register(Listener listenerEndpoint, ListenerConfiguration config, service object {} ftpService,
handle name) returns handle|Error = @java:Method{
name: "register",
'class: "org.ballerinalang.stdlib.ftp.server.FtpListenerHelper"
'class: "io.ballerina.stdlib.ftp.server.FtpListenerHelper"
} external;
File renamed without changes.
2 changes: 1 addition & 1 deletion ftp-ballerina/init.bal → ballerina/init.bal
Original file line number Diff line number Diff line change
@@ -21,5 +21,5 @@ function init() {
}

function setModule() = @java:Method {
'class: "org.ballerinalang.stdlib.ftp.util.ModuleUtils"
'class: "io.ballerina.stdlib.ftp.util.ModuleUtils"
} external;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -592,30 +592,30 @@ public function stopServer() returns error? {

function initAnonymousFtpServer(map<anydata> config) returns Error? = @java:Method{
name: "initAnonymousFtpServer",
'class: "org.ballerinalang.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
'class: "io.ballerina.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
} external;

function initFtpServer(map<anydata> config) returns Error? = @java:Method{
name: "initFtpServer",
'class: "org.ballerinalang.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
'class: "io.ballerina.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
} external;

function initSftpServer(map<anydata> config) returns Error? = @java:Method{
name: "initSftpServer",
'class: "org.ballerinalang.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
'class: "io.ballerina.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
} external;

function stopFtpServer() returns () = @java:Method{
name: "stopFtpServer",
'class: "org.ballerinalang.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
'class: "io.ballerina.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
} external;

function stopAnonymousFtpServer() returns () = @java:Method{
name: "stopAnonymousFtpServer",
'class: "org.ballerinalang.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
'class: "io.ballerina.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
} external;

function stopSftpServer() returns error? = @java:Method{
name: "stopSftpServer",
'class: "org.ballerinalang.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
'class: "io.ballerina.stdlib.ftp.testutils.mockServerUtils.MockFtpServer"
} external;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions build-config/checkstyle/build.gradle
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ plugins {

apply plugin: 'java'

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'
@@ -40,9 +40,9 @@ clean {
}

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

artifacts.add('default', file("$project.buildDir/suppressions.xml")) {
builtBy('downloadMultipleFiles')
builtBy('downloadCheckstyleRuleFiles')
}
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -89,10 +89,10 @@ subprojects {
}
dependencies {
/* Standard libraries */
ballerinaStdLibs "org.ballerinalang:log-ballerina:${stdlibLogVersion}"
ballerinaStdLibs "org.ballerinalang:io-ballerina:${stdlibIoVersion}"
ballerinaStdLibs "org.ballerinalang:task-ballerina:${stdlibTaskVersion}"
ballerinaStdLibs "org.ballerinalang:time-ballerina:${stdlibTimeVersion}"
ballerinaStdLibs "io.ballerina.stdlib:log-ballerina:${stdlibLogVersion}"
ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${stdlibIoVersion}"
ballerinaStdLibs "io.ballerina.stdlib:task-ballerina:${stdlibTaskVersion}"
ballerinaStdLibs "io.ballerina.stdlib:time-ballerina:${stdlibTimeVersion}"
}
}

2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ coverage:
round: down
range: "60...80"
ignore:
- "ftp-test-utils/"
- "test-utils/"
103 changes: 0 additions & 103 deletions ftp-ballerina/Ballerina.toml

This file was deleted.

12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
org.gradle.caching=true
group=org.ballerinalang
group=io.ballerina.stdlib
version=1.1.0-beta.3-SNAPSHOT

puppycrawlCheckstyleVersion=8.18
@@ -21,10 +21,10 @@ minaCoreVersion=2.0.16
aopallianceVersion=1.0
jclSlf4jVersion=1.7.21

ballerinaGradlePluginVersion=0.9.1
ballerinaGradlePluginVersion=0.10.0

ballerinaLangVersion=2.0.0-beta.2.1
stdlibTaskVersion=2.0.0-beta.2
stdlibLogVersion=1.1.0-beta.2
stdlibIoVersion=0.6.0-beta.2
stdlibTimeVersion=2.0.0-beta.2
stdlibTaskVersion=2.0.0-beta.3-20210708-181600-4f72d85
stdlibLogVersion=1.1.0-beta.3-20210709-092800-330c154
stdlibIoVersion=0.6.0-beta.3-20210708-142400-de75ca2
stdlibTimeVersion=2.0.0-beta.3-20210708-150800-a71f297
Loading