From 287aa10988a70acda61b06b11efb4f390a622e70 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Fri, 10 Oct 2025 06:46:47 +0200 Subject: [PATCH] Prepare kts build --- MPChartLib/build.gradle | 22 +++++++++++----------- build.gradle | 12 ++++++------ settings.gradle | 2 -- settings.gradle.kts | 2 ++ 4 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/MPChartLib/build.gradle b/MPChartLib/build.gradle index a77c339e8..bd27a0553 100644 --- a/MPChartLib/build.gradle +++ b/MPChartLib/build.gradle @@ -1,7 +1,7 @@ plugins { - id 'com.android.library' - id 'maven-publish' - id 'kotlin-android' + id "com.android.library" + id "maven-publish" + id "kotlin-android" id "com.vanniktech.maven.publish" version "0.34.0" } @@ -15,7 +15,7 @@ ext { } android { - namespace 'com.github.mikephil.charting' + namespace "com.github.mikephil.charting" defaultConfig { minSdkVersion 21 compileSdk 35 @@ -23,9 +23,9 @@ android { // VERSION_NAME no longer available as of 4.1 // https://issuetracker.google.com/issues/158695880 - buildConfigField 'String', 'VERSION_NAME', "\"${getTag()}\"" + buildConfigField "String", "VERSION_NAME", "\"${getTag()}\"" - consumerProguardFiles 'proguard-lib.pro' + consumerProguardFiles "proguard-lib.pro" } compileOptions { sourceCompatibility JavaVersion.VERSION_17 @@ -45,14 +45,14 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.9.1' - implementation 'androidx.core:core:1.16.0' + implementation "androidx.annotation:annotation:1.9.1" + implementation "androidx.core:core:1.16.0" implementation "androidx.activity:activity-ktx:1.10.1" - testImplementation 'junit:junit:4.13.2' + testImplementation "junit:junit:4.13.2" } -tasks.register('androidSourcesJar', Jar) { - archiveClassifier.set('sources') +tasks.register("androidSourcesJar", Jar) { + archiveClassifier.set("sources") from android.sourceSets.main.java.srcDirs } diff --git a/build.gradle b/build.gradle index 22bb3f7cf..9c79482b1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ buildscript { - ext.kotlin_version = '2.2.20' + ext.kotlin_version = "2.2.20" repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.13.0' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath "com.android.tools.build:gradle:8.13.0" + classpath "com.github.dcendents:android-maven-gradle-plugin:2.1" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -16,17 +16,17 @@ allprojects { repositories { google() mavenCentral() - maven { url 'https://jitpack.io' } + maven { url "https://jitpack.io" } } } -@SuppressWarnings('unused') +@SuppressWarnings("unused") static def getTag() { def process = "git describe --tags --abbrev=0".execute() return process.text.toString().trim() } -@SuppressWarnings('unused') +@SuppressWarnings("unused") static def getGitCommitCount() { def process = "git rev-list HEAD --count".execute() return process.text.toInteger() diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index bba62b591..000000000 --- a/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -include "MPChartLib" -include "app" diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 000000000..062df08df --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,2 @@ +include("MPChartLib") +include("app")