Skip to content

Commit

Permalink
gradle and kotlin update - part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelavoyan committed Apr 1, 2024
1 parent 338eb3a commit 05718d6
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
PACKAGE_TYPE: "aar"
GRADLE_VERSION: "7.5"
GRADLE_VERSION: "8.4"
JAVA_VERSION: "17"
ARTIFACT_PATH: "VCL/build/outputs"
ANDROID_NEXUS_SIGNING_KEY_ID: ${{ secrets.ANDROID_NEXUS_SIGNING_KEY_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
PACKAGE_TYPE: "aar"
GRADLE_VERSION: "7.5"
GRADLE_VERSION: "8.4"
JAVA_VERSION: "17"
ARTIFACT_PATH: "VCL/build/outputs"
GLOBAL_ENV: ${{ github.event_name == 'push' && format('{0}', 'dev') || inputs.environment }}
Expand Down
21 changes: 12 additions & 9 deletions VCL/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ plugins {
}

android {
compileSdk 33
compileSdk 34
// buildToolsVersion "30.0.3"
namespace 'io.velocitycareerlabs'

defaultConfig {
minSdk 24
targetSdk 33
versionName "2.4.3"
versionCode 139
targetSdk 34
versionName "2.4.4"
versionCode 140
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
Expand Down Expand Up @@ -63,6 +63,9 @@ android {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
}
buildFeatures {
buildConfig true
}
}

java {
Expand Down Expand Up @@ -120,7 +123,7 @@ afterEvaluate {
from components.java
}

artifact androidSourcesJar
// artifact androidSourcesJar

// Mostly self-explanatory metadata
pom {
Expand Down Expand Up @@ -164,7 +167,7 @@ afterEvaluate {
from components.java
}

artifact androidSourcesJar
// artifact androidSourcesJar

// Mostly self-explanatory metadata
pom {
Expand Down Expand Up @@ -216,7 +219,7 @@ repositories {
*/

dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.core:core-ktx:1.12.0'

implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3'
//noinspection GradleDependency
Expand All @@ -229,13 +232,13 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
// Optional -- Robolectric environment
testImplementation 'androidx.test:core:1.5.0'
testImplementation 'org.robolectric:robolectric:4.11.1'
testImplementation 'org.robolectric:robolectric:4.12'
// Optional -- Mockito framework
testImplementation "org.mockito:mockito-core:5.11.0"
testImplementation "org.mockito:mockito-inline:5.2.0"
// Required -- JSON framework
testImplementation 'org.json:json:20240303'
// jsonassert
// json assert
testImplementation 'org.skyscreamer:jsonassert:1.5.1'

androidTestImplementation 'androidx.test.ext:junit:1.1.5'
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ plugins {
}

android {
compileSdk 33
compileSdk 34
// buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.vcl.wallet"
minSdk 24
targetSdk 33
targetSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -43,9 +43,9 @@ android {
}

dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

androidTestImplementation 'androidx.test.ext:junit:1.1.5'
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.7.21"
ext.kotlin_version = "1.9.23"
// Set "rc" suffix for VCL SDK release candidate
ext.rcSuffix = "rc"
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -19,7 +19,7 @@ buildscript {
plugins {
// Automation plugin
// https://github.com/gradle-nexus/publish-plugin
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}

// Publishing scripts
Expand All @@ -31,11 +31,11 @@ allprojects {
google()
mavenCentral()
maven {
url "$buildDir/VCL"
url "${getLayout().getBuildDirectory()}/VCL"
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
tasks.register('clean', Delete) {
delete rootProject.getLayout().getBuildDirectory()
}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ android.enableJetifier=true
kotlin.code.style=official
#android.enableR8=true
#android.enableD8=true
android.disableAutomaticComponentCreation=true
#android.disableAutomaticComponentCreation=true
#android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
4 changes: 2 additions & 2 deletions publish-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ nexusPublishing {
}

// Create custom tasks for publishing
task publishRelease(dependsOn: [':VCL:publishReleasePublicationToSonatypeRepository'])
task publishRc(dependsOn: [':VCL:publishRcPublicationToSonatypeRepository'])
tasks.register('publishRelease') { dependsOn([':VCL:publishReleasePublicationToSonatypeRepository']) }
tasks.register('publishRc') { dependsOn([':VCL:publishRcPublicationToSonatypeRepository']) }

0 comments on commit 05718d6

Please sign in to comment.