-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ballerina-platform:main' into main
- Loading branch information
Showing
42 changed files
with
965 additions
and
311 deletions.
There are no files selected for viewing
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# These are explicitly windows files and should use crlf | ||
*.bat text eol=crlf | ||
|
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,57 @@ | ||
name: Daily build | ||
|
||
# Controls when the action will run. | ||
on: | ||
schedule: | ||
- cron: '30 2 * * *' | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
# Set up Java Environment | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
# Grant execute permission to the gradlew script | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
# Build the project with Gradle | ||
- name: Build with Gradle | ||
env: | ||
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | ||
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | ||
run: | | ||
./gradlew build | ||
# Build the ballerina project | ||
- name: Ballerina Build | ||
uses: ballerina-platform/ballerina-action/@nightly | ||
with: | ||
args: | ||
build -c --skip-tests | ||
env: | ||
JAVA_HOME: /usr/lib/jvm/default-jvm | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | ||
WORKING_DIR: ./gpeople | ||
# Publish Github Package | ||
- name: Publish Github Package | ||
env: | ||
publishUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | ||
publishPAT: ${{ secrets.CONNECTOR_PUBLISH_PAT }} | ||
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | ||
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
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 |
---|---|---|
@@ -1,37 +1,14 @@ | ||
# Compiled class file | ||
*.class | ||
# resources folder | ||
/resources | ||
|
||
# Log file | ||
*.log | ||
# idea files | ||
*.idea | ||
|
||
# BlueJ files | ||
*.ctxt | ||
# .ballerina files | ||
*.ballerina | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
#Ballerina configuartion file | ||
ballerina.conf | ||
|
||
#Target folder of ballerina project | ||
/target | ||
|
||
#json files created inside resources folder | ||
/modules | ||
|
||
#resource folder in tests folder | ||
/tests/resources | ||
|
||
Config.toml | ||
# Ignore Gradle build output directory | ||
build |
This file was deleted.
Oops, something went wrong.
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,96 @@ | ||
/* | ||
* Copyright (c) 2021, 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 "com.github.johnrengelman.shadow" version "5.2.0" | ||
id "de.undercouch.download" version "4.0.4" | ||
id "net.researchgate.release" version "2.8.0" | ||
} | ||
|
||
ext.ballerinaLangVersion = project.ballerinaLangVersion | ||
|
||
allprojects { | ||
group = project.group | ||
version = project.version | ||
|
||
apply plugin: 'jacoco' | ||
apply plugin: 'maven-publish' | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'java' | ||
} | ||
|
||
def artifactCacheParent = file("${project.projectDir}/build/cache_parent/") | ||
def packageName = "googleapis.people" | ||
def packageOrg = "ballerinax" | ||
def pathToBala = file("${project.projectDir}/gpeople/target/bala") | ||
def platform = "java11" | ||
|
||
task createBalaDirectory { | ||
mkdir "${project.projectDir}/gpeople/target/bala" | ||
} | ||
|
||
task build { | ||
dependsOn('gpeople:build') | ||
} | ||
|
||
task copyDistribution { | ||
inputs.dir file(project.projectDir) | ||
|
||
pathToBala.eachFileMatch(~/.*.bala/) { balaFile -> | ||
copy { | ||
from zipTree(balaFile) | ||
into file("${artifactCacheParent}/bala/${packageOrg}/${packageName}/${project.version}/${platform}") | ||
} | ||
} | ||
copy { | ||
from file("${project.projectDir}/gpeople/target/cache") | ||
exclude '**/*-testable.jar' | ||
exclude '**/tests_cache/' | ||
into file("${artifactCacheParent}/cache/") | ||
} | ||
outputs.dir artifactCacheParent | ||
} | ||
|
||
task createArtifactZip(type: Zip) { | ||
from "${buildDir}/cache_parent" | ||
archiveName 'distribution.zip' | ||
destinationDir(file("${buildDir}/distribution")) | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifact source: createArtifactZip, extension: 'zip' | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/ballerina-platform/module-ballerinax-googleapis.people") | ||
credentials { | ||
username = System.getenv("publishUser") | ||
password = System.getenv("publishPAT") | ||
} | ||
} | ||
} | ||
} | ||
|
||
publish.dependsOn copyDistribution |
Oops, something went wrong.