From 6457a1b7c4c32a920c172e90e1f66e7f541da8c8 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Tue, 15 Aug 2023 19:24:31 +0530 Subject: [PATCH] Removed --add-open and upgraded gradle to 8.0 --- app/build.gradle | 17 +++++++++----- build.gradle | 6 ++--- core/build.gradle | 28 +++++++++++++++++++++--- gradle.properties | 3 +-- gradle/wrapper/gradle-wrapper.properties | 2 +- jitpack.yml | 9 +------- 6 files changed, 42 insertions(+), 23 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 202e0d5..06522ec 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,8 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { - compileSdkVersion rootProject.ext.compileSdkVersion + namespace 'org.mifos' + compileSdk rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { @@ -29,15 +30,19 @@ android { packagingOptions { exclude 'META-INF/core_release.kotlin_module' } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = '17' + } } dependencies { - //implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "androidx.multidex:multidex:$rootProject.multidexVersion" - implementation ("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"){ - force true - } + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "androidx.appcompat:appcompat:$rootProject.appCompatVersion" testImplementation "junit:junit:$rootProject.jUnitVersion" androidTestImplementation "androidx.test.ext:junit:$rootProject.androidJUnitVersion" @@ -64,7 +69,7 @@ dependencies { implementation "com.squareup.okhttp3:okhttp:$okHttp3Version" implementation "com.squareup.okhttp3:logging-interceptor:$okHttp3Version" - implementation project(path: ':core') + implementation project(':core') // fineract dependency implementation ("com.github.openMF:fineract-client:$fineractClientVersion") diff --git a/build.gradle b/build.gradle index 2157071..395cb13 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:8.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong @@ -53,7 +53,7 @@ ext { retrofitVersionLatest = '2.9.0' // okHttp3 version - okHttp3Version = '4.9.2' + okHttp3Version = '4.11.0' // preference version preference = '1.2.1' @@ -62,7 +62,7 @@ ext { rxJavaVersion = '1.3.8' // rxJavaAndroid version - rxAndroidVersion = '1.1.0' + rxAndroidVersion = '1.2.1' // fineract version fineractClientVersion = '2.0.3' diff --git a/core/build.gradle b/core/build.gradle index 2de367b..f06d5f9 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,9 +1,11 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' +apply plugin: 'maven-publish' android { - compileSdkVersion 33 + namespace 'org.mifos.core' + compileSdk 33 buildToolsVersion "29.0.3" defaultConfig { @@ -26,10 +28,16 @@ android { packagingOptions { exclude 'META-INF/core_release.kotlin_module' } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = '17' + } } dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "androidx.appcompat:appcompat:$rootProject.appCompatVersion" testImplementation "junit:junit:$rootProject.jUnitVersion" androidTestImplementation "androidx.test.ext:junit:$rootProject.androidJUnitVersion" @@ -57,9 +65,23 @@ dependencies { implementation "com.squareup.okhttp3:logging-interceptor:$okHttp3Version" //Shared Preferences dependency - implementation "androidx.preference:preference:$preference" + implementation "androidx.preference:preference-ktx:$preference" // fineractClient dependency implementation ("com.github.openMF:fineract-client:$fineractClientVersion") } + +publishing { + publications { + release(MavenPublication) { + groupId = 'com.github.openMF' + artifactId = 'mifos-android-sdk-arch' + version = '1.0.6' + + afterEvaluate { + from components.release + } + } + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index f5b82a1..58c152a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,8 +6,7 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 --add-opens java.base/java.io=ALL-UNNAMED -# added --add-opens java.base/java.io=ALL-UNNAMED to resolve error module java.base does not "opens java.io" to unnamed module +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0d98277..afc4b8f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip diff --git a/jitpack.yml b/jitpack.yml index 5a2602d..1e41e00 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,9 +1,2 @@ jdk: - - openjdk17 -before_install: - - sdk install java 17.0.3-tem - - sdk use java 17.0.3-tem - - sdk install maven - - mvn -v -install: - - mvn install -Dmaven.javadoc.skip=true -DskipTests \ No newline at end of file + - openjdk17 \ No newline at end of file