From 419c424c899a1ac0b4483742de4b802cc5bbbbcc Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 8 Oct 2023 21:45:25 +0200 Subject: [PATCH] chore: Fixed minor gradle and kotlin issues --- app/build.gradle | 10 +++++----- .../java/com/termux/styling/TermuxStyleActivity.kt | 7 +++---- build.gradle | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6546429..afb9902 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,12 +5,12 @@ plugins { android { namespace "com.termux.styling" - compileSdkVersion 34 defaultConfig { applicationId "com.termux.styling" minSdkVersion 21 targetSdkVersion 28 + compileSdk 34 versionCode 30 versionName "0.30" } @@ -51,8 +51,8 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } -task versionName { - doLast { - print android.defaultConfig.versionName - } +tasks.register("versionName") { + doLast { + print android.defaultConfig.versionName + } } diff --git a/app/src/main/java/com/termux/styling/TermuxStyleActivity.kt b/app/src/main/java/com/termux/styling/TermuxStyleActivity.kt index 3fdfaf2..cdae60e 100644 --- a/app/src/main/java/com/termux/styling/TermuxStyleActivity.kt +++ b/app/src/main/java/com/termux/styling/TermuxStyleActivity.kt @@ -17,7 +17,6 @@ import android.widget.Button import android.widget.TextView import android.widget.Toast import java.io.File -import java.io.FileOutputStream import java.io.IOException import java.nio.charset.StandardCharsets import java.util.* @@ -178,9 +177,9 @@ class TermuxStyleActivity : Activity() { atomicFile.finishWrite(out) // Note: Must match constant in Term#onCreate(): - val ACTION_RELOAD = "com.termux.app.reload_style" - val executeIntent = Intent(ACTION_RELOAD) - executeIntent.putExtra(ACTION_RELOAD, if (colors) "colors" else "font") + val actionReload = "com.termux.app.reload_style" + val executeIntent = Intent(actionReload) + executeIntent.putExtra(actionReload, if (colors) "colors" else "font") sendBroadcast(executeIntent) } catch (e: Exception) { Log.w("termux", "Failed to write $outputFile", e) diff --git a/build.gradle b/build.gradle index ab345eb..a6b531b 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { @@ -15,6 +15,6 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } }