Skip to content

Commit 7ef1d0c

Browse files
committed
updates gradle, android plugin, dependencies etc. to latest. also updates to use JDK 17.
1 parent e2c1bbe commit 7ef1d0c

File tree

6 files changed

+43
-28
lines changed

6 files changed

+43
-28
lines changed

androidplot-core/build.gradle

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
plugins {
1818
id 'com.android.library'
19-
id 'com.dicedmelon.gradle.jacoco-android'
19+
id 'com.mxalbert.gradle.jacoco-android'
2020
id 'maven-publish'
2121
id 'signing'
2222
}
@@ -58,9 +58,15 @@ task generateAttrsMarkdown(type: AttrMarkdown) {
5858
}
5959

6060
android {
61-
compileSdkVersion theCompileSdkVersion
61+
62+
compileOptions {
63+
sourceCompatibility JavaVersion.VERSION_17
64+
targetCompatibility JavaVersion.VERSION_17
65+
}
66+
6267

6368
defaultConfig {
69+
compileSdk theCompileSdkVersion
6470
minSdkVersion theMinSdkVersion
6571
targetSdkVersion theTargetSdkVersion
6672
testApplicationId "com.androidplot.test"
@@ -90,9 +96,9 @@ def gitUrl = 'https://github.com/halfhp/androidplot.git'
9096
dependencies {
9197

9298
implementation 'com.halfhp.fig:figlib:1.0.11'
93-
implementation 'androidx.annotation:annotation:1.4.0'
99+
implementation 'androidx.annotation:annotation:1.8.2'
94100

95-
testImplementation "org.mockito:mockito-core:4.0.0"
101+
testImplementation "org.mockito:mockito-core:5.7.0"
96102
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
97103
testImplementation "org.robolectric:robolectric:4.7.3"
98104
}
@@ -110,12 +116,12 @@ task javadoc(type: Javadoc) {
110116
}
111117

112118
task javadocJar(type: Jar, dependsOn: javadoc) {
113-
classifier = 'javadoc'
119+
archiveClassifier.set('javadoc')
114120
from javadoc.destinationDir
115121
}
116122

117123
task sourcesJar(type: Jar) {
118-
classifier = 'sources'
124+
archiveClassifier.set('sources')
119125
from android.sourceSets.main.java.srcDirs
120126
}
121127

@@ -137,9 +143,11 @@ afterEvaluate {
137143
}
138144

139145
publications {
140-
release(MavenPublication) {
141146

142-
from components.release
147+
publications.withType(MavenPublication) {
148+
// release(MavenPublication) {
149+
//
150+
// from components.release
143151

144152
// You can then customize attributes of the publication as shown below.
145153
groupId = 'com.androidplot'
@@ -176,13 +184,11 @@ afterEvaluate {
176184
}
177185
}
178186

179-
afterEvaluate {
180-
signing {
181-
def signingKey = System.getenv("SIGNING_KEY")
182-
def signingPassword = System.getenv("SIGNING_PASSWORD")
183-
useInMemoryPgpKeys(signingKey, signingPassword)
184-
sign publishing.publications.release
185-
}
187+
signing {
188+
def signingKey = System.getenv("SIGNING_KEY")
189+
def signingPassword = System.getenv("SIGNING_PASSWORD")
190+
useInMemoryPgpKeys(signingKey, signingPassword)
191+
sign publishing.publications
186192
}
187193

188194
artifacts {

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616

1717
ext {
18-
theCompileSdkVersion = 32
19-
theTargetSdkVersion = 32
18+
theCompileSdkVersion = 34
19+
theTargetSdkVersion = 34
2020
theMinSdkVersion = 5
2121
theVersionName = '1.5.11'
2222
theVersionCode = 226
@@ -32,8 +32,8 @@ buildscript {
3232
}
3333

3434
dependencies {
35-
classpath 'com.android.tools.build:gradle:7.4.2'
36-
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.5'
35+
classpath 'com.android.tools.build:gradle:8.5.2'
36+
classpath 'com.mxalbert.gradle:jacoco-android:0.2.0'
3737
}
3838
}
3939

demoapp-wearable/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ android {
3838
}
3939

4040
compileOptions {
41-
sourceCompatibility JavaVersion.VERSION_1_6
42-
targetCompatibility JavaVersion.VERSION_1_6
41+
sourceCompatibility JavaVersion.VERSION_17
42+
targetCompatibility JavaVersion.VERSION_17
4343
}
44+
4445
buildTypes {
4546
release {
4647
minifyEnabled false

demoapp/build.gradle

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
buildscript {
18-
ext.kotlin_version = '1.7.10'
18+
ext.kotlin_version = '2.0.0'
1919
repositories {
2020
mavenCentral()
2121
}
@@ -33,15 +33,25 @@ plugins {
3333
apply plugin: 'kotlin-android'
3434

3535
dependencies {
36-
implementation "androidx.core:core-ktx:1.8.0"
36+
implementation "androidx.core:core-ktx:1.13.1"
3737
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3838
implementation project(':androidplot-core')
39-
implementation 'androidx.recyclerview:recyclerview:1.2.1'
39+
implementation 'androidx.recyclerview:recyclerview:1.3.2'
4040

4141
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
4242
}
4343

44+
kotlin {
45+
jvmToolchain(17)
46+
}
47+
4448
android {
49+
50+
compileOptions {
51+
sourceCompatibility JavaVersion.VERSION_17
52+
targetCompatibility JavaVersion.VERSION_17
53+
}
54+
4555
compileSdkVersion theCompileSdkVersion
4656

4757
buildFeatures {
@@ -51,7 +61,7 @@ android {
5161
defaultConfig {
5262
versionCode theVersionCode
5363
versionName theVersionName
54-
minSdkVersion 14
64+
minSdkVersion 19
5565
targetSdkVersion theTargetSdkVersion
5666
applicationId "com.androidplot.demos"
5767
}

demoapp/project.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,3 @@
3939
#proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt
4040
# using config with optimization enabled so that things like log statement removal will work:
4141
proguard.config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:proguard-project.txt
42-
# Project target.
43-
target=android-16

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip

0 commit comments

Comments
 (0)