Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from aasaru/gradle_4.10.3
Browse files Browse the repository at this point in the history
FINCN-179 gradle to 4.10.3, FINCN-178 make Travis build forks ...
  • Loading branch information
aasaru committed Oct 9, 2019
2 parents 94f1c72 + a1f3ddb commit 740eff5
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 68 deletions.
5 changes: 3 additions & 2 deletions README.md
@@ -1,7 +1,8 @@
# Apache Fineract CN Notifications [![Build Status](https://api.travis-ci.com/apache/fineract-cn-notifications.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-notifications) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/apache/fineract-cn-notifications)](https://hub.docker.com/r/apache/fineract-cn-notifications/builds)

# Apache Fineract CN Notification [![Build Status](https://api.travis-ci.com/apache/fineract-cn-notifications.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-notifications)
This microservice implements SMS and Email Notification functionality.
[Read more](https://cwiki.apache.org/confluence/display/FINERACT/Fineract+CN+Project+Structure#FineractCNProjectStructure-notifications).

This mircroservice implements SMS and Email Notification functionalities

## Abstract
Apache Fineract CN is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.
Expand Down
7 changes: 5 additions & 2 deletions api/build.gradle
Expand Up @@ -21,14 +21,17 @@ buildscript {
}

dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
classpath 'io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE'
}
}

plugins {
id "com.github.hierynomus.license" version "0.13.1"
id("org.nosphere.apache.rat") version "0.3.1"
id("org.nosphere.apache.rat") version "0.5.2"
id "com.jfrog.artifactory" version "4.9.5"
id "io.spring.dependency-management" version "1.0.8.RELEASE"
id 'maven-publish'
id 'java'
}

apply from: '../shared.gradle'
Expand Down
7 changes: 7 additions & 0 deletions build.gradle
Expand Up @@ -53,6 +53,13 @@ task prepareForTest {
dependsOn gradle.includedBuild('component-test').task(':build')
}

task clean {
group 'all'
dependsOn gradle.includedBuild('api').task(':clean')
dependsOn gradle.includedBuild('service').task(':clean')
dependsOn gradle.includedBuild('component-test').task(':clean')
}

task licenseFormat {
group 'all'
dependsOn gradle.includedBuild('api').task(':licenseFormat')
Expand Down
17 changes: 11 additions & 6 deletions component-test/build.gradle
Expand Up @@ -20,25 +20,30 @@ buildscript {
springBootVersion = '1.4.1.RELEASE'
asciidoctorVersion = '1.5.3'
}

repositories {
jcenter()
}

dependencies {
classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.asciidoctor:asciidoctor-gradle-plugin:${asciidoctorVersion}")
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
}
}

plugins {
id "com.github.hierynomus.license" version "0.13.1"
id("org.nosphere.apache.rat") version "0.3.1"
id 'com.github.hierynomus.license' version '0.13.1'
id("org.nosphere.apache.rat") version "0.5.2"
id "com.jfrog.artifactory" version "4.9.5"
id "org.springframework.boot" version "1.4.3.RELEASE"
id 'maven-publish'
id 'java'
}

apply from: '../shared.gradle'
apply plugin: 'org.asciidoctor.convert'

bootRepackage {
enabled = false
}

dependencies {
compile(
[group: 'org.apache.fineract.cn.notification', name: 'api', version: project.version],
Expand Down
35 changes: 18 additions & 17 deletions component-test/src/main/resources/templates/template.html
@@ -1,22 +1,23 @@
<!--
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.
-->
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.
-->
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
#Sat Dec 01 23:10:38 MUT 2018
#Mon Sep 30 20:06:23 EEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
6 changes: 3 additions & 3 deletions gradlew
Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -155,7 +155,7 @@ if $cygwin ; then
fi

# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
Expand Down
28 changes: 14 additions & 14 deletions service/build.gradle
Expand Up @@ -19,28 +19,25 @@ buildscript {
ext {
springBootVersion = '1.4.1.RELEASE'
}

repositories {
jcenter()
}

dependencies {
classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}

plugins {
id "com.github.hierynomus.license" version "0.13.1"
id("org.nosphere.apache.rat") version "0.3.1"
id("org.nosphere.apache.rat") version "0.5.2"
id "com.jfrog.artifactory" version "4.9.5"
id "org.springframework.boot" version "1.4.3.RELEASE"
id 'maven-publish'
id 'java'
id 'idea'
}

apply from: '../shared.gradle'

apply plugin: 'spring-boot'

springBoot {
executable = true
bootRepackage {
enabled = true
classifier = 'boot'
}

Expand Down Expand Up @@ -68,12 +65,15 @@ dependencies {
[group: 'org.apache.fineract.cn', name: 'command', version: versions.frameworkcommand],
[group: 'org.apache.fineract.cn.permitted-feign-client', name: 'library', version: versions.frameworkpermittedfeignclient],
[group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator],
[group: 'org.apache.commons', name: 'commons-csv', version: versions.apachecsvreader]

[group: 'org.apache.commons', name: 'commons-csv', version: versions.apachecsvreader],
[group: 'io.netty', name: 'netty-all', version: '4.1.39.Final'],
[group: 'io.netty', name: 'netty-transport-native-epoll', version: '4.1.39.Final']
)
}

publishToMavenLocal.dependsOn bootRepackage
tasks.withType(PublishToMavenLocal) { task ->
task.dependsOn 'bootRepackage'
}

publishing {
publications {
Expand All @@ -85,7 +85,7 @@ publishing {
}
bootService(MavenPublication) {
// "boot" jar
artifact ("$buildDir/libs/$project.name-$version-boot.jar")
artifact(file("$buildDir/libs/$project.name-$project.version-${bootRepackage.classifier}.jar"))
groupId project.group
artifactId ("$project.name-boot")
version project.findProperty('externalVersion') ?: project.version
Expand Down
2 changes: 1 addition & 1 deletion service/src/main/resources/application.yml
Expand Up @@ -35,7 +35,7 @@ eureka:
defaultZone: http://localhost:8761/eureka/

server:
port: 8081
port: 2033
contextPath: /notification/v1/*

cassandra:
Expand Down
10 changes: 10 additions & 0 deletions service/src/main/resources/banner.txt
@@ -0,0 +1,10 @@
_____ _ _ ____ _ _
| ___(_)_ __ ___ _ __ __ _ ___| |_ / ___| \ | |
| |_ | | '_ \ / _ \ '__/ _` |/ __| __|____| | | \| |
| _| | | | | | __/ | | (_| | (__| ||_____| |___| |\ |
|_| |_|_| |_|\___|_| \__,_|\___|\__| \____|_| \_|
_ _ _ _ __ _ _ _
| \ | | ___ | |_(_)/ _(_) ___ __ _| |_(_) ___ _ __ ___
| \| |/ _ \| __| | |_| |/ __/ _` | __| |/ _ \| '_ \/ __|
| |\ | (_) | |_| | _| | (_| (_| | |_| | (_) | | | \__ \
|_| \_|\___/ \__|_|_| |_|\___\__,_|\__|_|\___/|_| |_|___/
29 changes: 12 additions & 17 deletions shared.gradle
Expand Up @@ -44,11 +44,6 @@ ext.versions = [

]

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'io.spring.dependency-management'

tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -85,7 +80,7 @@ dependencies {
}

jar {
from sourceSets.main.allSource
from sourceSets.main.java
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

Expand Down Expand Up @@ -119,17 +114,17 @@ license {
rat {
// List of exclude directives, defaults to ['**/.gradle/**']
excludes = [
"**/.idea/**",
"**/.gradle/**",
"**/gradle/**",
"**/build/**",
"gradlew",
"gradlew.bat",
"README.md",
".dockerignore",
"component-test/src/main/resources/importdata/*.csv",
"service/src/main/resources/templatedetails/*.csv",
"**/*.csv",
"**/*.log",
"**/.gradle/**",
"**/.idea/**",
"**/banner.txt",
"**/build/**",
"**/gradle/**",
".dockerignore",
"gradlew",
"gradlew.bat",
"README.md",
]
plainOutput = true
}

16 changes: 12 additions & 4 deletions travis.sh
Expand Up @@ -36,6 +36,12 @@ function build_pullrequest() {
./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
}

# Builds Forked (non-apache) Repository
function build_fork() {
echo -e "Building branch $TRAVIS_BRANCH of fork $TRAVIS_REPO_SLUG. Won't publish anything to Artifactory."
./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
}

# For other branches we need to add branch name as prefix
function build_otherbranch() {
echo -e "Building a snapshot out of branch [$TRAVIS_BRANCH] and publishing it with prefix '${TRAVIS_BRANCH}-SNAPSHOT'"
Expand All @@ -49,17 +55,19 @@ function build_tag() {

}

echo -e "TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG"
echo -e "TRAVIS_BRANCH=$TRAVIS_BRANCH"
echo -e "TRAVIS_TAG=$TRAVIS_TAG"
echo -e "TRAVIS_COMMIT=${TRAVIS_COMMIT::7}"
echo -e "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"

# Build Logic
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [[ $TRAVIS_REPO_SLUG != apache* ]]; then
build_fork
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
build_pullrequest
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ] ; then
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]; then
build_otherbranch
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ] ; then
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]; then
build_snapshot
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
build_tag
Expand Down

0 comments on commit 740eff5

Please sign in to comment.