-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Maninda/master
Add Ballerina AWS SES Connector
- Loading branch information
Showing
25 changed files
with
2,053 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build master branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
run: | | ||
./gradlew publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Daily build | ||
|
||
on: | ||
schedule: | ||
- cron: '0 */12 * * *' | ||
|
||
jobs: | ||
ubuntu-build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Build with Gradle | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
run: ./gradlew build | ||
|
||
windows-build: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Build with Gradle | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
run: ./gradlew.bat build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Publish release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Publish artifact | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }} | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
run: | | ||
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3) | ||
echo "New version: ${NEW_VERSION}" | ||
echo "Github username: ${GITHUB_ACTOR}" | ||
./gradlew -PpublishToCentral=true -Pversion=${NEW_VERSION} publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Ballerina AWS SES module build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ubuntu-build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Build with Gradle | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
run: ./gradlew build | ||
|
||
windows-build: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Build with Gradle | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
run: ./gradlew.bat build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
* | ||
* 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 { | ||
id "de.undercouch.download" | ||
} | ||
|
||
task downloadMultipleFiles(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' | ||
]) | ||
overwrite false | ||
onlyIfNewer true | ||
dest buildDir | ||
} | ||
|
||
jar { | ||
enabled = false | ||
} | ||
|
||
clean { | ||
enabled = false | ||
} | ||
|
||
artifacts.add('default', file("$project.buildDir/checkstyle.xml")) { | ||
builtBy('downloadMultipleFiles') | ||
} | ||
|
||
artifacts.add('default', file("$project.buildDir/suppressions.xml")) { | ||
builtBy('downloadMultipleFiles') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/* | ||
* Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
* | ||
* 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 { | ||
id "com.github.spotbugs" version "4.0.5" | ||
id "de.undercouch.download" version "4.0.4" | ||
id "net.researchgate.release" version "2.6.0" | ||
} | ||
|
||
ext.ballerinaLangVersion = project.ballerinaLangVersion | ||
ext.puppycrawlCheckstyleVersion = project.puppycrawlCheckstyleVersion | ||
ext.testngVersion = "6.14.3" | ||
ext.slf4jVersion = project.slf4jVersion | ||
ext.stdlibEncodingVersion = project.stdlibEncodingVersion | ||
|
||
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/repositories/snapshots/' | ||
} | ||
|
||
maven { | ||
url = 'https://maven.wso2.org/nexus/content/groups/wso2-public/' | ||
} | ||
|
||
maven { | ||
url = 'https://maven.wso2.org/nexus/content/repositories/orgballerinalang-1509' | ||
} | ||
|
||
maven { | ||
url = 'https://repo.maven.apache.org/maven2' | ||
} | ||
|
||
maven { | ||
url "https://maven.pkg.github.com/ballerina-platform/module-ballerina-encoding" | ||
credentials { | ||
username System.getenv("packageUser") | ||
password System.getenv("packagePAT") | ||
} | ||
} | ||
} | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'java' | ||
|
||
configurations { | ||
ballerinaStdLibs | ||
} | ||
|
||
dependencies { | ||
/* Standard libraries */ | ||
ballerinaStdLibs "org.ballerinalang:encoding-ballerina:${stdlibEncodingVersion}" | ||
} | ||
|
||
release { | ||
// Disable check snapshots temporarily | ||
buildTasks = [] | ||
failOnSnapshotDependencies = false | ||
failOnCommitNeeded = false | ||
versionPropertyFile = 'gradle.properties' | ||
tagTemplate = 'v${version}' | ||
git { | ||
// To release from any branch | ||
requireBranch = null | ||
} | ||
} | ||
} | ||
|
||
task codeCoverageReport(type: JacocoReport) { | ||
dependsOn = subprojects.test | ||
|
||
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.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") | ||
} | ||
|
||
onlyIf = { | ||
true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
org.gradle.caching=true | ||
group=org.ballerinalang | ||
version=1.0.0-SNAPSHOT | ||
ballerinaLangVersion=2.0.0-Preview2 | ||
ballerinaTomlParserVersion=1.2.2 | ||
nettyVersion=4.1.39.Final | ||
nettyTcnativeVersion=2.0.25.Final | ||
puppycrawlCheckstyleVersion=8.18 | ||
slf4jVersion=1.7.30 | ||
wso2TransportHttpNettyVersion=6.3.9 | ||
wso2CommonsPoolVersion=1.5.6.wso2v1 | ||
wso2CarbonMetricsVersion=2.3.7 | ||
wso2SnakeYamlVersion=1.16.0.wso2v1 | ||
stdlibEncodingVersion=1.0.0-SNAPSHOT |
Oops, something went wrong.