Skip to content

Commit

Permalink
FINERACT-1194: Move Gradle wrapper to root folder
Browse files Browse the repository at this point in the history
  • Loading branch information
vidakovic authored and ptuomola committed Oct 11, 2020
1 parent 6a6c030 commit 26c1c17
Show file tree
Hide file tree
Showing 13 changed files with 148 additions and 421 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ We have [some open issues in JIRA with Kubernetes related enhancement ideas](htt

Instructions to download Gradle wrapper
============
The file fineract-provider/gradle/wrapper/gradle-wrapper.jar binary is checked into this projects Git source repository,
The file gradle/wrapper/gradle-wrapper.jar binary is checked into this projects Git source repository,
but won't exist in your copy of the Fineract codebase if you downloaded a released source archive from apache.org.
In that case, you need to download it using the commands below:

wget --no-check-certificate -P fineract-provider/gradle/wrapper https://github.com/apache/fineract/raw/develop/fineract-provider/gradle/wrapper/gradle-wrapper.jar
wget --no-check-certificate -P gradle/wrapper https://github.com/apache/fineract/raw/develop/gradle/wrapper/gradle-wrapper.jar

(or)

curl --insecure -L https://github.com/apache/fineract/raw/develop/fineract-provider/gradle/wrapper/gradle-wrapper.jar > fineract-provider/gradle/wrapper/gradle-wrapper.jar
curl --insecure -L https://github.com/apache/fineract/raw/develop/gradle/wrapper/gradle-wrapper.jar > gradle/wrapper/gradle-wrapper.jar


Instructions to run Apache RAT (Release Audit Tool)
Expand Down
23 changes: 23 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +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
*
* https://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.
*/
buildscript {
repositories {
jcenter()
}
}
File renamed without changes.
40 changes: 20 additions & 20 deletions fineract-provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Run as:
gradle clean bootRun'''

group = 'org.apache.fineract'
buildDir = new File(rootProject.projectDir, "../build")
buildDir = new File(rootProject.projectDir, "build")

repositories {
jcenter()
Expand Down Expand Up @@ -176,7 +176,7 @@ targetCompatibility = JavaVersion.VERSION_11
// set the classes directory to point to Eclipse's default build directory
if (project.hasProperty('env') && project.getProperty('env') == 'eclipse')
{
sourceSets.main.java.outputDir = new File(rootProject.projectDir, "bin/main")
sourceSets.main.java.outputDir = new File(rootProject.projectDir, "fineract-provider/bin/main")
}

eclipse
Expand Down Expand Up @@ -272,7 +272,7 @@ spotless {
java {
importOrder() //sort imports alphabetically
removeUnusedImports()
eclipse().configFile '../config/fineractdev-formatter.xml'
eclipse().configFile "$rootDir/config/fineractdev-formatter.xml"
endWithNewline()
trimTrailingWhitespace()

Expand Down Expand Up @@ -622,22 +622,22 @@ compileJava {
}

war {
from('../licenses/binary/') {
from("$rootDir/licenses/binary/") {
// notice the parens
into "WEB-INF/licenses/binary/" // no leading slash
}
from('../LICENSE_RELEASE') {
from("$rootDir/LICENSE_RELEASE") {
// notice the parens
into "WEB-INF/" // no leading slash
}
from('../NOTICE_RELEASE') {
from("$rootDir/NOTICE_RELEASE") {
// notice the parens
into "WEB-INF/" // no leading slash
}
rename ('LICENSE_RELEASE', 'LICENSE')
rename ('NOTICE_RELEASE', 'NOTICE')

from('../DISCLAIMER') {
from("$rootDir/DISCLAIMER") {
// notice the parens
into "WEB-INF/" // no leading slash
}
Expand All @@ -647,7 +647,7 @@ war {
// Configuration for Gradle license plug-in
// https://github.com/hierynomus/license-gradle-plugin
license {
header rootProject.file('../APACHE_LICENSETEXT.md')
header rootProject.file("$rootDir/APACHE_LICENSETEXT.md")
excludes([
"**/git.properties",
"**/*.html",
Expand All @@ -661,7 +661,7 @@ license {
}

task licenseFormatBuildScripts (type:nl.javadude.gradle.plugins.license.License) {
source = fileTree(dir: '../', includes: [
source = fileTree(dir: "$rootDir/", includes: [
'**/*.bat',
'**/*.sh',
'**/*.sql'
Expand Down Expand Up @@ -849,27 +849,27 @@ distributions {
contents {
from bootJar
from bootWar
from('../build/swagger-code-fineract/build/libs/') {
from("$rootDir/build/swagger-code-fineract/build/libs/") {
include '**/*.jar'
rename 'client-(.+)\\.jar', 'fineract-client.jar'
}
from('../licenses/binary/') {
from("$rootDir/licenses/binary/") {
into "licenses/binary/"
}
from '../LICENSE_RELEASE'
from '../NOTICE_RELEASE'
from "$rootDir/LICENSE_RELEASE"
from "$rootDir/NOTICE_RELEASE"
rename ('LICENSE_RELEASE', 'LICENSE')
rename ('NOTICE_RELEASE', 'NOTICE')

from '../DISCLAIMER'
from '../README.md'
from "$rootDir/DISCLAIMER"
from "$rootDir/README.md"
}
}
src {
baseName "apache-fineract-$releaseVersion-src"
contents {
from "../"
exclude 'build' , '.git', '.gradle', '.github', '.settings', '.project', '.classpath', '.idea', 'out', '._.DS_Store', '.DS_Store', 'WebContent', '.externalToolbuilders', '.theia', '.gitpod.yml', '.travis.yml', 'LICENSE_RELEASE', 'NOTICE_RELEASE', '**/licenses/binary'
from "$rootDir/"
exclude '**/build' , '.git', '.gradle', '.github', '.settings', '.project', '.classpath', '.idea', 'out', '._.DS_Store', '.DS_Store', 'WebContent', '.externalToolbuilders', '.theia', '.gitpod.yml', '.travis.yml', 'LICENSE_RELEASE', 'NOTICE_RELEASE', '**/licenses/binary'
rename ('LICENSE_SOURCE', 'LICENSE')
rename ('NOTICE_SOURCE', 'NOTICE')
}
Expand All @@ -895,7 +895,7 @@ if( project.hasProperty("fineract.release") ) {
task.getFilesToSign().each { f ->
new ByteArrayOutputStream().withStream { os ->
def result = exec {
workingDir '../build/distributions'
workingDir "$rootDir/build/distributions"
executable 'sh'
args '-c', "gpg --verify ${f}.asc"
standardOutput = os
Expand Down Expand Up @@ -985,7 +985,7 @@ task prepareConfigJson(dependsOn: 'generateGitProperties') {

swaggerSources {
fineract {
inputFile = file('../build/classes/java/main/static/swagger-ui/fineract.yaml')
inputFile = file("$rootDir/build/classes/java/main/static/swagger-ui/fineract.yaml")
code {
language = 'java'
configFile = file('config/swagger/config.json')
Expand All @@ -1002,7 +1002,7 @@ task buildSwaggerCodeFineract(type:Exec, dependsOn: [
'resolve',
'generateSwaggerCodeFineract'
]) {
workingDir '../build/swagger-code-fineract'
workingDir "$rootDir/build/swagger-code-fineract"
executable 'sh'
args '-c', 'chmod +x gradlew && ./gradlew clean build'
}
20 changes: 0 additions & 20 deletions fineract-provider/gradle.properties

This file was deleted.

185 changes: 0 additions & 185 deletions fineract-provider/gradlew

This file was deleted.

1 change: 1 addition & 0 deletions fineract-provider/gradlew
Loading

0 comments on commit 26c1c17

Please sign in to comment.