Skip to content

Commit

Permalink
updates gradle, android plugin, dependencies etc. to latest. also upd…
Browse files Browse the repository at this point in the history
…ates to use JDK 17.
  • Loading branch information
halfhp committed Aug 22, 2024
1 parent e2c1bbe commit 7ef1d0c
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 28 deletions.
36 changes: 21 additions & 15 deletions androidplot-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id 'com.android.library'
id 'com.dicedmelon.gradle.jacoco-android'
id 'com.mxalbert.gradle.jacoco-android'
id 'maven-publish'
id 'signing'
}
Expand Down Expand Up @@ -58,9 +58,15 @@ task generateAttrsMarkdown(type: AttrMarkdown) {
}

android {
compileSdkVersion theCompileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}


defaultConfig {
compileSdk theCompileSdkVersion
minSdkVersion theMinSdkVersion
targetSdkVersion theTargetSdkVersion
testApplicationId "com.androidplot.test"
Expand Down Expand Up @@ -90,9 +96,9 @@ def gitUrl = 'https://github.com/halfhp/androidplot.git'
dependencies {

implementation 'com.halfhp.fig:figlib:1.0.11'
implementation 'androidx.annotation:annotation:1.4.0'
implementation 'androidx.annotation:annotation:1.8.2'

testImplementation "org.mockito:mockito-core:4.0.0"
testImplementation "org.mockito:mockito-core:5.7.0"
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation "org.robolectric:robolectric:4.7.3"
}
Expand All @@ -110,12 +116,12 @@ task javadoc(type: Javadoc) {
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}

task sourcesJar(type: Jar) {
classifier = 'sources'
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}

Expand All @@ -137,9 +143,11 @@ afterEvaluate {
}

publications {
release(MavenPublication) {

from components.release
publications.withType(MavenPublication) {
// release(MavenPublication) {
//
// from components.release

// You can then customize attributes of the publication as shown below.
groupId = 'com.androidplot'
Expand Down Expand Up @@ -176,13 +184,11 @@ afterEvaluate {
}
}

afterEvaluate {
signing {
def signingKey = System.getenv("SIGNING_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.release
}
signing {
def signingKey = System.getenv("SIGNING_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}

artifacts {
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

ext {
theCompileSdkVersion = 32
theTargetSdkVersion = 32
theCompileSdkVersion = 34
theTargetSdkVersion = 34
theMinSdkVersion = 5
theVersionName = '1.5.11'
theVersionCode = 226
Expand All @@ -32,8 +32,8 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.5'
classpath 'com.android.tools.build:gradle:8.5.2'
classpath 'com.mxalbert.gradle:jacoco-android:0.2.0'
}
}

Expand Down
5 changes: 3 additions & 2 deletions demoapp-wearable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

buildTypes {
release {
minifyEnabled false
Expand Down
18 changes: 14 additions & 4 deletions demoapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '2.0.0'
repositories {
mavenCentral()
}
Expand All @@ -33,15 +33,25 @@ plugins {
apply plugin: 'kotlin-android'

dependencies {
implementation "androidx.core:core-ktx:1.8.0"
implementation "androidx.core:core-ktx:1.13.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation project(':androidplot-core')
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'

debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
}

kotlin {
jvmToolchain(17)
}

android {

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

compileSdkVersion theCompileSdkVersion

buildFeatures {
Expand All @@ -51,7 +61,7 @@ android {
defaultConfig {
versionCode theVersionCode
versionName theVersionName
minSdkVersion 14
minSdkVersion 19
targetSdkVersion theTargetSdkVersion
applicationId "com.androidplot.demos"
}
Expand Down
2 changes: 0 additions & 2 deletions demoapp/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,3 @@
#proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt
# using config with optimization enabled so that things like log statement removal will work:
proguard.config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:proguard-project.txt
# Project target.
target=android-16
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.7-all.zip

0 comments on commit 7ef1d0c

Please sign in to comment.