blob: f294eccfc5066b8b9821367d949713bf05253e5c [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF 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.
*/
gradle.ext.ballerina = [
version: '0.990.2'
]
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
}
}
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'
mainClassName = 'org.ballerinalang.openwhisk.runtime.Application'
repositories {
mavenCentral()
mavenLocal()
maven { url "https://maven.wso2.org/nexus/content/repositories/public/org/ballerinalang" }
maven { url "http://maven.wso2.org/nexus/content/groups/wso2-public" }
}
dependencies {
compile "org.wso2.msf4j:msf4j-service:2.4.2"
compile group: 'org.apache.ws.commons.axiom', name: 'axiom-impl', version: '1.2.11-wso2v12'
compile ("org.wso2.msf4j:msf4j-core:2.4.2") {
force = true
}
compile "org.ballerinalang:ballerina-core:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-lang:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-grpc:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-h2:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-http:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-internal:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-io:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-jms:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-log-api:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-math:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-mime:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-mysql:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-reflect:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-runtime:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-sql:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-streams:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-system:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-task:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-time:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-transactions:${gradle.ballerina.version}"
compile "org.ballerinalang:ballerina-websub:${gradle.ballerina.version}"
compile "org.slf4j:slf4j-api:1.7.22"
}
configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-simple'
exclude group: 'org.ops4j.pax.logging', module: 'pax-logging-api'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.6' //version required
}
defaultTasks 'shadowJar'
// Configure the shadow jar task
shadowJar {
mergeServiceFiles()
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
jar {
manifest {
attributes 'Main-Class': mainClassName
}
}
task copyRepoDependencies() {
configurations.compile.resolvedConfiguration.resolvedArtifacts.each { artifact ->
if (artifact.file.name.endsWith("ballerina-binary-repo.zip")) {
copy {
from zipTree( artifact.file )
into ("${buildDir}/lib")
}
}
}
}