Skip to content

Commit

Permalink
Merge pull request #231 from ballerina-platform/mdev
Browse files Browse the repository at this point in the history
Change the group ID and rename the sub modules
  • Loading branch information
madhukaw authored Jul 9, 2021
2 parents 0a12a48 + 9e59f0a commit 330c154
Show file tree
Hide file tree
Showing 66 changed files with 89 additions and 109 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/build-timestamped-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: log-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
Expand Up @@ -17,13 +17,6 @@ jobs:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build
- name: Archive Error Log
uses: actions/upload-artifact@v2
if: failure()
with:
name: Ballerina Internal Log
path: log-ballerina/ballerina-internal.log
if-no-files-found: ignore
- name: Generate Codecov Report
if: github.event_name == 'pull_request'
uses: codecov/codecov-action@v1
Expand Down
10 changes: 10 additions & 0 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
org = "ballerina"
name = "log"
version = "@toml.version@"

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

[[platform.java11.dependency]]
path = "../test-utils/build/libs/log-test-utils-@project.version@.jar"
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion log-ballerina/init.bal → ballerina/init.bal
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ function init() returns error? {
}

isolated function setModule() = @java:Method {
'class: "org.ballerinalang.stdlib.log.ModuleUtils"
'class: "io.ballerina.stdlib.log.ModuleUtils"
} external;
4 changes: 2 additions & 2 deletions log-ballerina/natives.bal → ballerina/natives.bal
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,6 @@ isolated function isLogLevelEnabled(string logLevel) returns boolean {
return logLevelWeight.get(logLevel) >= logLevelWeight.get(moduleLogLevel);
}

isolated function getModuleName() returns string = @java:Method {'class: "org.ballerinalang.stdlib.log.Utils"} external;
isolated function getModuleName() returns string = @java:Method {'class: "io.ballerina.stdlib.log.Utils"} external;

isolated function getCurrentTime() returns string = @java:Method {'class: "org.ballerinalang.stdlib.log.Utils"} external;
isolated function getCurrentTime() returns string = @java:Method {'class: "io.ballerina.stdlib.log.Utils"} external;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ public isolated function main() {
attempts = isolated function() returns int { return 3;});
}

isolated function isValidDateTime(string dateTime) returns boolean = @java:Method {'class: "org.ballerinalang.stdlib.log.testutils.utils.OSUtils"} external;
isolated function isValidDateTime(string dateTime) returns boolean = @java:Method {'class: "io.ballerina.stdlib.log.testutils.utils.OSUtils"} external;
6 changes: 3 additions & 3 deletions build-config/checkstyle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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')
}
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
}

allprojects {
group = 'org.ballerinalang'
group = project.group
version = project.version

apply plugin: 'jacoco'
Expand Down Expand Up @@ -65,8 +65,8 @@ subprojects {
}
dependencies {
/* Standard libraries */
ballerinaStdLibs "org.ballerinalang:io-ballerina:${stdlibIoVersion}"
ballerinaStdLibs "org.ballerinalang:regex-ballerina:${stdlibRegexVersion}"
ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${stdlibIoVersion}"
ballerinaStdLibs "io.ballerina.stdlib:regex-ballerina:${stdlibRegexVersion}"
}
}

Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fixes:

ignore:
- "**/tests"
- "log-test-utils"
- "test-utils"

coverage:
precision: 2
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
org.gradle.caching=true
group=org.ballerinalang
group=io.ballerina.stdlib
version=1.1.0-beta.3-SNAPSHOT
ballerinaLangVersion=2.0.0-beta.2.1
stdlibIoVersion=0.6.0-beta.2
stdlibRegexVersion=0.7.0-beta.2
stdlibIoVersion=0.6.0-beta.3-20210708-142400-de75ca2
stdlibRegexVersion=0.7.0-beta.3-20210708-161600-c58ceb5
testngVersion=6.14.3
puppycrawlCheckstyleVersion=8.18
ballerinaGradlePluginVersion=0.9.1
ballerinaGradlePluginVersion=0.10.0
13 changes: 13 additions & 0 deletions integration-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
org = "ballerina"
name = "integration_tests"
version = "@toml.version@"

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

[[platform.java11.dependency]]
path = "../test-utils/build/libs/log-test-utils-@project.version@.jar"

[[platform.java11.dependency]]
path = "./lib/io-native-@io.native.version@.jar"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies {
jbalTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") {
transitive = false
}
externalJars (group: 'org.ballerinalang', name: 'io-native', version: "${stdlibIoVersion}") {
externalJars (group: 'io.ballerina.stdlib', name: 'io-native', version: "${stdlibIoVersion}") {
transitive = false
}
implementation project(':log-native')
Expand Down Expand Up @@ -117,11 +117,11 @@ task copyLogStdlib {
doLast {
/* Copy Log module */
copy {
from "$project.rootDir/log-ballerina/build/cache_parent/bala"
from "$project.rootDir/ballerina/build/cache_parent/bala"
into "${ballerinaDist}/repo/bala"
}
copy {
from "$project.rootDir/log-ballerina/build/cache_parent/cache"
from "$project.rootDir/ballerina/build/cache_parent/cache"
into "${ballerinaDist}/repo/cache"
}
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ isolated function init() {
}

isolated function setModule() = @java:Method {
'class: "org.ballerinalang.stdlib.log.testutils.nativeimpl.ModuleUtils"
'class: "io.ballerina.stdlib.log.testutils.nativeimpl.ModuleUtils"
} external;
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ public class Process {

isolated function nativeWaitForExit(Process process) returns int | Error = @java:Method {
name: "waitForExit",
'class: "org.ballerinalang.stdlib.log.testutils.nativeimpl.WaitForExit"
'class: "io.ballerina.stdlib.log.testutils.nativeimpl.WaitForExit"
} external;

isolated function nativeExitCode(Process process) returns int | Error = @java:Method {
name: "exitCode",
'class: "org.ballerinalang.stdlib.log.testutils.nativeimpl.ExitCode"
'class: "io.ballerina.stdlib.log.testutils.nativeimpl.ExitCode"
} external;

isolated function nativeStderr(Process process) returns io:ReadableByteChannel = @java:Method {
name: "stderr",
'class: "org.ballerinalang.stdlib.log.testutils.nativeimpl.Stderr"
'class: "io.ballerina.stdlib.log.testutils.nativeimpl.Stderr"
} external;

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -294,5 +294,5 @@ isolated function validateLog(string log, string output) {
function exec(@untainted string command, @untainted map<string> env = {},
@untainted string? dir = (), @untainted string... args) returns Process|error = @java:Method {
name: "exec",
'class: "org.ballerinalang.stdlib.log.testutils.nativeimpl.Exec"
'class: "io.ballerina.stdlib.log.testutils.nativeimpl.Exec"
} external;
17 changes: 0 additions & 17 deletions log-ballerina/Ballerina.toml

This file was deleted.

24 changes: 0 additions & 24 deletions log-integration-tests/Ballerina.toml

This file was deleted.

4 changes: 2 additions & 2 deletions log-native/build.gradle → native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ description = 'Ballerina - Log Java Utils'
dependencies {
implementation group: 'org.ballerinalang', name: 'ballerina-lang', version: "${ballerinaLangVersion}"
implementation group: 'org.ballerinalang', name: 'ballerina-runtime', version: "${ballerinaLangVersion}"
checkstyle project(":build-config:checkstyle")
checkstyle project(":checkstyle")
checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}"
}

Expand Down Expand Up @@ -72,7 +72,7 @@ tasks.withType(Checkstyle) {
}

spotbugsMain.finalizedBy validateSpotbugs
checkstyleMain.dependsOn(":build-config:checkstyle:downloadMultipleFiles")
checkstyleMain.dependsOn(":checkstyle:downloadCheckstyleRuleFiles")

compileJava {
doFirst {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@

module io.ballerina.stdlib.log {
requires io.ballerina.runtime;
exports org.ballerinalang.stdlib.log;
exports io.ballerina.stdlib.log;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package org.ballerinalang.stdlib.log;
package io.ballerina.stdlib.log;

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Module;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package org.ballerinalang.stdlib.log;
package io.ballerina.stdlib.log;

import io.ballerina.runtime.api.utils.IdentifierUtils;
import io.ballerina.runtime.api.utils.StringUtils;
Expand Down
14 changes: 13 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@ plugins {
}

rootProject.name = 'log'
include(':build-config:checkstyle')
include(':checkstyle')
include ':log-native', ':log-test-utils', ':log-ballerina', ':log-integration-tests'

include ':checkstyle'
include ':log-native'
include ':log-test-utils'
include ':log-ballerina'
include ':log-integration-tests'

project(':checkstyle').projectDir = file("build-config${File.separator}checkstyle")
project(':log-native').projectDir = file('native')
project(':log-test-utils').projectDir = file('test-utils')
project(':log-ballerina').projectDir = file('ballerina')
project(':log-integration-tests').projectDir = file('integration-tests')

gradleEnterprise {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
Expand Down
6 changes: 3 additions & 3 deletions log-test-utils/build.gradle → test-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ description = 'Ballerina - Log Java Utils'
dependencies {
implementation group: 'org.ballerinalang', name: 'ballerina-lang', version: "${ballerinaLangVersion}"
implementation group: 'org.ballerinalang', name: 'ballerina-runtime', version: "${ballerinaLangVersion}"
implementation group: 'org.ballerinalang', name: 'io-native', version: "${stdlibIoVersion}"
implementation group: 'io.ballerina.stdlib', name: 'io-native', version: "${stdlibIoVersion}"
implementation project(":log-native")
checkstyle project(":build-config:checkstyle")
checkstyle project(":checkstyle")
checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}"
}

Expand Down Expand Up @@ -74,7 +74,7 @@ tasks.withType(Checkstyle) {
}

spotbugsMain.finalizedBy validateSpotbugs
checkstyleMain.dependsOn(":build-config:checkstyle:downloadMultipleFiles")
checkstyleMain.dependsOn(":checkstyle:downloadCheckstyleRuleFiles")

compileJava {
doFirst {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
requires java.logging;
requires io.ballerina.stdlib.log;
requires io.ballerina.stdlib.io;
exports org.ballerinalang.stdlib.log.testutils.nativeimpl;
exports org.ballerinalang.stdlib.log.testutils.utils;
exports io.ballerina.stdlib.log.testutils.nativeimpl;
exports io.ballerina.stdlib.log.testutils.utils;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* under the License.
*/

package org.ballerinalang.stdlib.log.testutils.nativeimpl;
package io.ballerina.stdlib.log.testutils.nativeimpl;

import io.ballerina.runtime.api.values.BMap;
import io.ballerina.runtime.api.values.BString;
import org.ballerinalang.stdlib.log.testutils.utils.OSConstants;
import org.ballerinalang.stdlib.log.testutils.utils.OSUtils;
import io.ballerina.stdlib.log.testutils.utils.OSConstants;
import io.ballerina.stdlib.log.testutils.utils.OSUtils;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
* under the License.
*/

package org.ballerinalang.stdlib.log.testutils.nativeimpl;
package io.ballerina.stdlib.log.testutils.nativeimpl;

import io.ballerina.runtime.api.values.BObject;
import org.ballerinalang.stdlib.log.testutils.utils.OSConstants;
import org.ballerinalang.stdlib.log.testutils.utils.OSUtils;
import io.ballerina.stdlib.log.testutils.utils.OSConstants;
import io.ballerina.stdlib.log.testutils.utils.OSUtils;

/**
* External function for exitCode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package org.ballerinalang.stdlib.log.testutils.nativeimpl;
package io.ballerina.stdlib.log.testutils.nativeimpl;

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Module;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
* under the License.
*/

package org.ballerinalang.stdlib.log.testutils.nativeimpl;
package io.ballerina.stdlib.log.testutils.nativeimpl;

import io.ballerina.runtime.api.values.BObject;
import org.ballerinalang.stdlib.io.channels.AbstractNativeChannel;
import org.ballerinalang.stdlib.io.channels.BlobChannel;
import org.ballerinalang.stdlib.io.channels.BlobIOChannel;
import org.ballerinalang.stdlib.log.testutils.utils.OSUtils;
import io.ballerina.stdlib.io.channels.AbstractNativeChannel;
import io.ballerina.stdlib.io.channels.BlobChannel;
import io.ballerina.stdlib.io.channels.BlobIOChannel;
import io.ballerina.stdlib.log.testutils.utils.OSUtils;

import java.io.InputStream;
import java.nio.channels.Channels;
Expand Down
Loading

0 comments on commit 330c154

Please sign in to comment.