Skip to content

Fix for Issue 21 - Upgrade to Java 11 and Gradle 6.6.1 #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,15 @@ repos/

smsmoduledb.*

!gradle/wrapper/gradle-wrapper.jar
!gradle/wrapper/gradle-wrapper.jar

######################
# Mac OSX
######################
.DS_Store
.svn

######################
# jenv
######################
.java-version
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
# message-gateway

## Development
To start your in dev mode, run:
```
./gradlew bootRun
```
## Build set up
##### To create standalone application:
./gradlew clean build
To create standalone application run:

```
./gradlew clean build
```
You can also create a standalone application by running:
```
./gradlew clean bootJar
```

##### To run
cd build/lib

java -jar message-gateway-0.0.1.jar

```
cd build/lib

java -jar message-gateway-0.0.1.jar
```

You can also run the application without packaging
```
./gradlew bootRun
```

##### To create deployable war:
```
./gradlew clean build -Pprofile=deployable

```
war file can be found in build/libs


Expand Down
72 changes: 45 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ buildscript {
jcenter()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.1.5.RELEASE',
'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
}
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'license'
plugins {
id 'org.springframework.boot' version '2.1.0.RELEASE'
// id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'idea'
id 'eclipse'
id "com.github.hierynomus.license" version "0.15.0"
id 'war'
}

if (project.hasProperty('profile')
&& project.getProperty('profile') == 'deployable') {
if (project.hasProperty('profile') && project.getProperty('profile') == 'deployable') {
apply from: 'profile-deployable.gradle'
} else {
apply from: 'profile-standalone.gradle'
Expand All @@ -31,9 +32,15 @@ repositories {
maven { url "https://repository.jboss.org/nexus/content/repositories/releases" }
}

group 'org.fineract'
version '0.0.1'
sourceCompatibility=11
targetCompatibility=11
assert System.properties["java.specification.version"] == "1.8" || "1.9" || "10" || "11"

license {
header rootProject.file('./LICENSE.md')
excludes(["**/*.html", "**/*.mustache", "**/package-info.java", "**/keystore.jks"])
excludes(["**/*.html", "**/*.yml", "**/*.mustache", "**/package-info.java", "**/keystore.jks"])
strictCheck true
}

Expand All @@ -42,22 +49,33 @@ task licenseFormatBuildScripts (type:nl.javadude.gradle.plugins.license.License)
}
licenseFormat.dependsOn licenseFormatBuildScripts


dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.flywaydb:flyway-core")
compile('org.apache.velocity:velocity:1.7')
compile('com.squareup.okhttp:okhttp:2.0.0')
compile('com.squareup.okhttp:okhttp-urlconnection:2.0.0')
compile('com.squareup.retrofit:retrofit:1.6.1')
compile('com.twilio.sdk:twilio:7.1.0')
compile('org.drizzle.jdbc:drizzle-jdbc:1.3')
compile('com.infobip:infobip-api-java-client:1.1.0')
testCompile("org.springframework.boot:spring-boot-starter-test")

}

task wrapper(type: Wrapper) {
gradleVersion = '1.11'

implementation "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
implementation "org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}"
implementation "org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}"
testImplementation "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
implementation "org.flywaydb:flyway-core:${flywayCoreBootVersion}"
implementation "org.apache.velocity:velocity:${apacheVelocityVersion}"
implementation "com.squareup.okhttp:okhttp:${squareupOkhttpVersion}"
implementation "com.squareup.okhttp:okhttp-urlconnection:${squareupOkhttpUrlConnectionVersion}"
implementation "com.squareup.retrofit:retrofit:${squareupRetrofitVersion}"
implementation "com.twilio.sdk:twilio:${twilioSdkVersion}"
implementation "org.drizzle.jdbc:drizzle-jdbc:${drizzleJdbcVersion}"
implementation "com.google.code.gson:gson:${googleCodeGsonVersion}"
implementation ("com.infobip:infobip-api-java-client:${infobipApiJavaClientVersion}") {
exclude group: 'com.google.code.gson', module: 'gson'
}
}

bootJar {
mainClassName = "org.fineract.messagegateway.MessageGateway"
}

test {
useJUnitPlatform()
}
wrapper {
gradleVersion = '6.6.1'
}
12 changes: 12 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
rootProject.name=message-gateway

springBootVersion=2.4.4
flywayCoreBootVersion=6.5.7
apacheVelocityVersion:1.7
squareupOkhttpVersion:2.0.0
squareupOkhttpUrlConnectionVersion:2.0.0
squareupRetrofitVersion:1.6.1
twilioSdkVersion:7.1.0
drizzleJdbcVersion:1.4
googleCodeGsonVersion:2.8.7
infobipApiJavaClientVersion:2.3.0
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Wed Sep 03 14:15:20 CEST 2014
#Sun Jun 13 01:47:04 CDT 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip

distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
10 changes: 3 additions & 7 deletions gradlew
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ case "`uname`" in
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
Expand All @@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
cd "$SAVED" >/dev/null

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

Expand Down Expand Up @@ -114,6 +109,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down
Loading