Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build.gradle #37

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ apply plugin: 'kotlin-android-extensions'

android {
// Note: SDK version 31 includes a great many revisions to core platform APIs.
compileSdkVersion 30
compileSdkVersion 34

defaultConfig {
applicationId "com.danefinlay.ttsutil"
minSdkVersion 15
targetSdkVersion 30
targetSdkVersion 34
versionCode 8
versionName "4.0.2"
multiDexEnabled true
}

lintOptions {
Expand Down Expand Up @@ -45,23 +46,25 @@ dependencies {
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.0.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.0.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.preference:preference-ktx:1.0.0'
implementation 'org.jetbrains.anko:anko-sdk15:0.9'
implementation 'org.jetbrains.anko:anko-support-v4:0.9.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.material:material:1.9.0'

implementation 'com.android.support:multidex:1.0.0'
}

repositories {
mavenCentral()
google()
}


task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ sealed class ActivityEvent : Parcelable {
}

class TTSReadyEvent : ActivityEvent(), Parcelable {
override fun writeToParcel(dest: Parcel?, flags: Int) {}
override fun writeToParcel(p0: Parcel, flags: Int) {}
override fun describeContents(): Int = 0

companion object CREATOR : Parcelable.Creator<TTSReadyEvent> {
Expand Down
17 changes: 11 additions & 6 deletions app/src/main/java/com/danefinlay/ttsutil/ui/ReadTextFragments.kt
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ abstract class ReadTextFragmentBase : MyFragment() {
override fun onClickSave() {
super.onClickSave()

// Determine the output directory. If the user has not chosen one, the
// Determine the output directory. If the user has not chosen one, the
// "external" storage is used.
val event = activityInterface?.getLastDirChosenEvent()
val directory: Directory = if (event != null) {
Expand All @@ -274,16 +274,21 @@ abstract class ReadTextFragmentBase : MyFragment() {
}

// Determine the names of the wave file and directory.
// TODO Allow the user to change the filename.
val waveFilename = getString(R.string.output_wave_filename) + ".wav"
// Get the current date and time in the format 'ddMMyyyy_HHmmss'.
val currentDateTime = SimpleDateFormat("ddMMyyyy_HHmmss", Locale.getDefault()).format(Date())

// Append the current date and time to the filename.
val waveFilename = "textToSpeech_$currentDateTime.wav"

val dirDisplayName: String = event?.firstDisplayName
?: getString(R.string.default_output_dir)
?: getString(R.string.default_output_dir)

// Build and display an appropriate alert dialog.
AlertDialogBuilder(ctx).apply {
title(R.string.write_to_file_alert_title)
message(getString(R.string.write_to_file_alert_message_3,
waveFilename, dirDisplayName))
message(getString(
R.string.write_to_file_alert_message_3,
waveFilename, dirDisplayName))
positiveButton(R.string.alert_positive_message_2) {
// Ask the user for write permission if necessary.
withStoragePermission { granted ->
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
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.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip