diff --git a/app/build.gradle.kts b/app/build.gradle.kts index aad2da0..f6aac4a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -3,10 +3,11 @@ import java.io.FileNotFoundException import java.util.Properties plugins { - id("com.android.application") - id("kotlin-android") - id("com.osacky.fladle") - id("com.github.triplet.play") version "3.8.4" + alias(libs.plugins.android.application) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.fladle) + alias(libs.plugins.triplet.play) id("com.wbrawner.releasehelper") } @@ -23,7 +24,7 @@ try { } android { - packagingOptions { + packaging { resources { excludes += listOf( "META-INF/LICENSE-LGPL-2.1.txt", @@ -34,7 +35,7 @@ android { ) } } - compileSdk = 34 + compileSdk = libs.versions.maxSdk.get().toInt() compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 @@ -44,8 +45,8 @@ android { } defaultConfig { applicationId = "com.wbrawner.simplemarkdown" - minSdk = 23 - targetSdk = 34 + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.maxSdk.get().toInt() versionCode = 41 versionName = "0.8.16" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" @@ -90,9 +91,6 @@ android { buildFeatures { compose = true } - composeOptions { - kotlinCompilerExtensionVersion = "1.5.3" - } playConfigs { register("play") { enabled.set(true) @@ -111,70 +109,65 @@ play { dependencies { "freeImplementation"(project(":free")) "playImplementation"(project(":non-free")) - implementation("androidx.compose.material3:material3-window-size-class-android:1.2.0") - val navigationVersion = "2.7.2" - implementation("androidx.navigation:navigation-compose:$navigationVersion") - testImplementation("junit:junit:4.13.2") - testRuntimeOnly("org.robolectric:robolectric:4.2.1") - val espressoVersion = "3.5.1" - androidTestImplementation("androidx.test.espresso:espresso-core:$espressoVersion") - androidTestImplementation("androidx.test.espresso:espresso-web:$espressoVersion") - androidTestImplementation("androidx.test.espresso:espresso-intents:$espressoVersion") - androidTestRuntimeOnly("androidx.test:runner:1.5.2") - androidTestUtil("androidx.test:orchestrator:1.4.2") - implementation("androidx.core:core-splashscreen:1.0.1") - implementation("androidx.appcompat:appcompat:1.6.1") - implementation("com.google.android.material:material:1.9.0") - implementation("androidx.core:core-ktx:1.12.0") - implementation("androidx.browser:browser:1.6.0") - val commonMarkVersion = "0.22.0" - implementation("org.commonmark:commonmark:$commonMarkVersion") - implementation("org.commonmark:commonmark-ext-gfm-tables:$commonMarkVersion") - implementation("org.commonmark:commonmark-ext-gfm-strikethrough:$commonMarkVersion") - implementation("org.commonmark:commonmark-ext-autolink:$commonMarkVersion") - implementation("org.commonmark:commonmark-ext-task-list-items:$commonMarkVersion") - implementation("org.commonmark:commonmark-ext-yaml-front-matter:$commonMarkVersion") - implementation("org.commonmark:commonmark-ext-image-attributes:$commonMarkVersion") - implementation("org.commonmark:commonmark-ext-heading-anchor:$commonMarkVersion") - val composeBom = platform("androidx.compose:compose-bom:2023.08.00") + implementation(libs.androidx.material3.windowsizeclass) + implementation(libs.androidx.navigation.compose) + testImplementation(libs.junit) + testRuntimeOnly(libs.robolectric) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(libs.androidx.espresso.web) + androidTestImplementation(libs.androidx.espresso.intents) + androidTestRuntimeOnly(libs.androidx.runner) + androidTestUtil(libs.androidx.orchestrator) + implementation(libs.androidx.core.splashscreen) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.browser) + implementation(libs.commonmark) + implementation(libs.commonmark.ext.gfm.tables) + implementation(libs.commonmark.ext.gfm.strikethrough) + implementation(libs.commonmark.ext.autolink) + implementation(libs.commonmark.ext.task.list.items) + implementation(libs.commonmark.ext.yaml.front.matter) + implementation(libs.commonmark.ext.image.attributes) + implementation(libs.commonmark.ext.heading.anchor) + val composeBom = enforcedPlatform(libs.compose.bom) implementation(composeBom) androidTestImplementation(composeBom) - implementation("androidx.compose.runtime:runtime") - implementation("androidx.compose.ui:ui") - implementation("androidx.activity:activity-compose") - implementation("androidx.compose.foundation:foundation") - implementation("androidx.compose.foundation:foundation-layout") - implementation("androidx.compose.ui:ui-tooling") - implementation("androidx.compose.material3:material3") - implementation("androidx.compose.material:material-icons-extended") - androidTestImplementation("androidx.compose.ui:ui-test-junit4") - val coroutinesVersion = "1.7.1" - runtimeOnly("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion") - testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion") - implementation("eu.crydee:syllable-counter:4.0.2") - androidTestImplementation("androidx.compose.ui:ui-test:1.6.0") - androidTestImplementation("androidx.test:core:1.5.0") - androidTestImplementation("androidx.test:monitor:1.6.1") - androidTestImplementation("junit:junit:4.13.2") - androidTestImplementation("org.hamcrest:hamcrest-core:1.3") - implementation("androidx.activity:activity-ktx:1.8.0") - implementation("androidx.activity:activity:1.8.0") - implementation("androidx.compose.animation:animation-core:1.6.0") - implementation("androidx.compose.animation:animation:1.6.0") - implementation("androidx.compose.material:material-icons-core:1.6.0") - implementation("androidx.compose.ui:ui-graphics:1.6.0") - implementation("androidx.compose.ui:ui-text:1.6.0") - implementation("androidx.compose.ui:ui-tooling-preview:1.6.0") - implementation("androidx.compose.ui:ui-unit:1.6.0") - implementation("androidx.core:core:1.13.1") - implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2") - implementation("androidx.lifecycle:lifecycle-viewmodel:2.6.2") - implementation("androidx.navigation:navigation-common:2.7.2") - implementation("androidx.navigation:navigation-runtime:2.7.2") - implementation("androidx.preference:preference:1.2.1") - implementation("ch.acra:acra-core:5.11.3") - implementation("com.jakewharton.timber:timber:5.0.1") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1") + implementation(libs.androidx.runtime) + implementation(libs.androidx.ui) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.foundation) + implementation(libs.androidx.foundation.layout) + implementation(libs.androidx.ui.tooling) + implementation(libs.androidx.material3) + implementation(libs.androidx.material.icons.extended) + androidTestImplementation(libs.androidx.ui.test.junit4) + runtimeOnly(libs.kotlinx.coroutines.android) + testImplementation(libs.kotlinx.coroutines.test) + implementation(libs.syllable.counter) + androidTestImplementation(libs.androidx.ui.test) + androidTestImplementation(libs.androidx.core) + androidTestImplementation(libs.androidx.monitor) + androidTestImplementation(libs.junit) + androidTestImplementation(libs.hamcrest.core) + implementation(libs.androidx.activity.ktx) + implementation(libs.androidx.activity.ktx) + implementation(libs.androidx.animation.core) + implementation(libs.androidx.animation) + implementation(libs.androidx.material.icons.core) + implementation(libs.androidx.ui.graphics) + implementation(libs.androidx.ui.text) + implementation(libs.androidx.ui.tooling.preview) + implementation(libs.androidx.ui.unit) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.viewmodel.ktx) + implementation(libs.androidx.navigation.common) + implementation(libs.androidx.navigation.runtime.ktx) + implementation(libs.androidx.preference.ktx) + implementation(libs.acra.core) + implementation(libs.timber) + implementation(libs.kotlinx.coroutines.core) implementation(project(":core")) } diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/ui/MarkdownText.kt b/app/src/main/java/com/wbrawner/simplemarkdown/ui/MarkdownText.kt index c4f1e51..82ee9f2 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/ui/MarkdownText.kt +++ b/app/src/main/java/com/wbrawner/simplemarkdown/ui/MarkdownText.kt @@ -3,6 +3,7 @@ package com.wbrawner.simplemarkdown.ui import android.view.ViewGroup import android.webkit.WebView import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.rememberScrollState @@ -62,8 +63,9 @@ fun MarkdownText(modifier: Modifier = Modifier, markdown: String) { modifier = modifier .fillMaxSize() .verticalScroll(rememberScrollState()), + verticalArrangement = Arrangement.Top ) { - HtmlText(modifier = modifier, html = html) + HtmlText(html = html) } } @@ -76,6 +78,9 @@ fun HtmlText(html: String, modifier: Modifier = Modifier) { | background: #${materialColors.surface.toArgb().toHexString().substring(2)}; | color: #${materialColors.onSurface.toArgb().toHexString().substring(2)}; |} + |a { + | color: #${materialColors.secondary.toArgb().toHexString().substring(2)}; + |} |pre { | background: #${materialColors.surfaceVariant.toArgb().toHexString().substring(2)}; | color: #${materialColors.onSurfaceVariant.toArgb().toHexString().substring(2)}; diff --git a/build.gradle.kts b/build.gradle.kts index 79ae3be..766994c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,25 +1,10 @@ -buildscript { - repositories { - gradlePluginPortal() - google() - mavenCentral() - } - dependencies { - classpath("com.android.tools.build:gradle:8.1.2") - classpath("com.google.gms:google-services:4.3.15") - classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.4") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10") - classpath("com.osacky.flank.gradle:fladle:0.17.4") - } -} - plugins { - id("com.autonomousapps.dependency-analysis") version "1.31.0" -} - -allprojects { - repositories { - google() - mavenCentral() - } -} + alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.google.services) apply false + alias(libs.plugins.firebase.crashlytics) apply false + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.compose.compiler) apply false + alias(libs.plugins.fladle) apply false + alias(libs.plugins.dependency.analysis) +} \ No newline at end of file diff --git a/core/build.gradle.kts b/core/build.gradle.kts index de24d2e..46113d5 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -3,8 +3,8 @@ import java.io.FileNotFoundException import java.util.Properties plugins { - id("com.android.library") - id("org.jetbrains.kotlin.android") + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) } val acraProperties = Properties() @@ -20,13 +20,12 @@ try { android { namespace = "com.wbrawner.simplemarkdown.core" - compileSdk = 34 + compileSdk = libs.versions.maxSdk.get().toInt() defaultConfig { - minSdk = 23 + minSdk = libs.versions.minSdk.get().toInt() testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles("consumer-rules.pro") buildConfigField("String", "ACRA_URL", "\"${acraProperties["url"]}\"") buildConfigField("String", "ACRA_USER", "\"${acraProperties["user"]}\"") buildConfigField("String", "ACRA_PASS", "\"${acraProperties["pass"]}\"") @@ -51,10 +50,9 @@ android { } dependencies { - val acraVersion = "5.11.3" - implementation("ch.acra:acra-core:$acraVersion") - implementation("ch.acra:acra-http:$acraVersion") - runtimeOnly("ch.acra:acra-limiter:$acraVersion") - runtimeOnly("ch.acra:acra-advanced-scheduler:$acraVersion") - api("com.jakewharton.timber:timber:5.0.1") + implementation(libs.acra.core) + implementation(libs.acra.http) + runtimeOnly(libs.acra.limiter) + runtimeOnly(libs.acra.advanced.scheduler) + api(libs.timber) } \ No newline at end of file diff --git a/free/build.gradle.kts b/free/build.gradle.kts index a934bb6..fa1de8c 100644 --- a/free/build.gradle.kts +++ b/free/build.gradle.kts @@ -1,17 +1,17 @@ plugins { - id("com.android.library") - id("org.jetbrains.kotlin.android") + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.compose.compiler) } android { namespace = "com.wbrawner.simplemarkdown.free" - compileSdk = 34 + compileSdk = libs.versions.maxSdk.get().toInt() defaultConfig { - minSdk = 23 + minSdk = libs.versions.minSdk.get().toInt() testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles("consumer-rules.pro") } buildTypes { @@ -26,9 +26,6 @@ android { buildFeatures { compose = true } - composeOptions { - kotlinCompilerExtensionVersion = "1.5.3" - } compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 @@ -39,9 +36,9 @@ android { } dependencies { - implementation("com.jakewharton.timber:timber:5.0.1") - val composeBom = platform("androidx.compose:compose-bom:2023.08.00") + implementation(libs.timber) + val composeBom = enforcedPlatform(libs.compose.bom) implementation(composeBom) androidTestImplementation(composeBom) - implementation("androidx.compose.runtime:runtime") + implementation(libs.runtime) } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..1fe08d6 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,117 @@ +[versions] +acra = "5.11.3" +activityKtx = "1.9.0" +animationCore = "1.6.8" +appcompat = "1.7.0" +billing = "7.0.0" +browser = "1.8.0" +commonMarkVersion = "0.22.0" +composeBom = "2024.06.00" +core = "1.6.1" +coreKtx = "1.13.1" +coreSplashscreen = "1.0.1" +coroutines = "1.7.3" +dependencyAnalysis = "1.31.0" +espressoVersion = "3.6.1" +fladle = "0.17.4" +googleServices = "4.4.2" +firebaseCrashlyticsGradle = "3.0.2" +androidGradlePlugin = "8.5.1" +hamcrestCore = "1.3" +junit = "4.13.2" +kotlin = "2.0.0" +lifecycleViewmodelKtx = "2.8.3" +material = "1.12.0" +material3WindowSizeClassAndroid = "1.2.1" +materialIconsCore = "1.6.8" +maxSdk = "35" +minSdk = "23" +monitor = "1.7.1" +navigationCommon = "2.7.7" +navigationRuntimeKtx = "2.7.7" +navigationVersion = "2.7.7" +orchestrator = "1.5.0" +play = "2.0.1" +preferenceKtx = "1.2.1" +robolectric = "4.2.1" +runner = "1.6.1" +syllableCounter = "4.0.2" +timber = "5.0.1" +tripletPlay = "3.8.4" + +[libraries] +acra-advanced-scheduler = { module = "ch.acra:acra-advanced-scheduler", version.ref = "acra" } +acra-core = { module = "ch.acra:acra-core", version.ref = "acra" } +acra-limiter = { module = "ch.acra:acra-limiter", version.ref = "acra" } +acra-http = { module = "ch.acra:acra-http", version.ref = "acra" } +androidx-activity-compose = { module = "androidx.activity:activity-compose" } +androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activityKtx" } +androidx-animation = { module = "androidx.compose.animation:animation", version.ref = "animationCore" } +androidx-animation-core = { module = "androidx.compose.animation:animation-core", version.ref = "animationCore" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } +androidx-browser = { module = "androidx.browser:browser", version.ref = "browser" } +androidx-compose-runtime-runtime = { module = "androidx.compose.runtime:runtime" } +androidx-core = { module = "androidx.test:core", version.ref = "core" } +androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } +androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" } +androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoVersion" } +androidx-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "espressoVersion" } +androidx-espresso-web = { module = "androidx.test.espresso:espresso-web", version.ref = "espressoVersion" } +androidx-foundation = { module = "androidx.compose.foundation:foundation" } +androidx-foundation-layout = { module = "androidx.compose.foundation:foundation-layout" } +androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" } +androidx-material-icons-core = { module = "androidx.compose.material:material-icons-core", version.ref = "materialIconsCore" } +androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" } +androidx-material3 = { module = "androidx.compose.material3:material3" } +androidx-material3-windowsizeclass = { module = "androidx.compose.material3:material3-window-size-class-android", version.ref = "material3WindowSizeClassAndroid" } +androidx-monitor = { module = "androidx.test:monitor", version.ref = "monitor" } +androidx-navigation-common = { module = "androidx.navigation:navigation-common", version.ref = "navigationCommon" } +androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationVersion" } +androidx-navigation-runtime-ktx = { module = "androidx.navigation:navigation-runtime-ktx", version.ref = "navigationRuntimeKtx" } +androidx-orchestrator = { module = "androidx.test:orchestrator", version.ref = "orchestrator" } +androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } +androidx-runner = { module = "androidx.test:runner", version.ref = "runner" } +androidx-runtime = { module = "androidx.compose.runtime:runtime" } +androidx-ui = { module = "androidx.compose.ui:ui" } +androidx-ui-graphics = { module = "androidx.compose.ui:ui-graphics" } +androidx-ui-test = { module = "androidx.compose.ui:ui-test" } +androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } +androidx-ui-text = { module = "androidx.compose.ui:ui-text" } +androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } +androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } +androidx-ui-unit = { module = "androidx.compose.ui:ui-unit" } +billing = { module = "com.android.billingclient:billing", version.ref = "billing" } +commonmark = { module = "org.commonmark:commonmark", version.ref = "commonMarkVersion" } +commonmark-ext-autolink = { module = "org.commonmark:commonmark-ext-autolink", version.ref = "commonMarkVersion" } +commonmark-ext-gfm-strikethrough = { module = "org.commonmark:commonmark-ext-gfm-strikethrough", version.ref = "commonMarkVersion" } +commonmark-ext-gfm-tables = { module = "org.commonmark:commonmark-ext-gfm-tables", version.ref = "commonMarkVersion" } +commonmark-ext-heading-anchor = { module = "org.commonmark:commonmark-ext-heading-anchor", version.ref = "commonMarkVersion" } +commonmark-ext-image-attributes = { module = "org.commonmark:commonmark-ext-image-attributes", version.ref = "commonMarkVersion" } +commonmark-ext-task-list-items = { module = "org.commonmark:commonmark-ext-task-list-items", version.ref = "commonMarkVersion" } +commonmark-ext-yaml-front-matter = { module = "org.commonmark:commonmark-ext-yaml-front-matter", version.ref = "commonMarkVersion" } +compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" } +foundation = { module = "androidx.compose.foundation:foundation" } +foundation-layout = { module = "androidx.compose.foundation:foundation-layout" } +hamcrest-core = { module = "org.hamcrest:hamcrest-core", version.ref = "hamcrestCore" } +junit = { module = "junit:junit", version.ref = "junit" } +kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } +material = { module = "com.google.android.material:material", version.ref = "material" } +material3 = { module = "androidx.compose.material3:material3" } +play-review-ktx = { module = "com.google.android.play:review-ktx", version.ref = "play" } +robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" } +runtime = { module = "androidx.compose.runtime:runtime" } +syllable-counter = { module = "eu.crydee:syllable-counter", version.ref = "syllableCounter" } +timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } +android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +dependency-analysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" } +firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsGradle" } +fladle = { id = "com.osacky.fladle", version.ref = "fladle" } +google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +triplet-play = { id = "com.github.triplet.play", version.ref = "tripletPlay" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 628afa5..09c0f59 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip diff --git a/non-free/build.gradle.kts b/non-free/build.gradle.kts index c7c2a01..04c916e 100644 --- a/non-free/build.gradle.kts +++ b/non-free/build.gradle.kts @@ -1,17 +1,17 @@ plugins { - id("com.android.library") - id("org.jetbrains.kotlin.android") + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.compose.compiler) } android { - namespace = "com.wbrawner.simplemarkdown" - compileSdk = 34 + namespace = "com.wbrawner.simplemarkdown.nonfree" + compileSdk = libs.versions.maxSdk.get().toInt() defaultConfig { - minSdk = 23 + minSdk = libs.versions.minSdk.get().toInt() testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles("consumer-rules.pro") } buildTypes { @@ -30,29 +30,26 @@ android { buildFeatures { compose = true } - composeOptions { - kotlinCompilerExtensionVersion = "1.5.3" - } kotlinOptions { jvmTarget = "1.8" } } dependencies { - implementation("androidx.core:core-ktx:1.13.1") - implementation("com.android.billingclient:billing:6.0.1") - api("com.jakewharton.timber:timber:5.0.1") - val composeBom = platform("androidx.compose:compose-bom:2023.08.00") + implementation(libs.androidx.core.ktx) + implementation(libs.billing) + api(libs.timber) + val composeBom = enforcedPlatform(libs.compose.bom) implementation(composeBom) androidTestImplementation(composeBom) - implementation("androidx.compose.runtime:runtime") - implementation("androidx.compose.ui:ui") - implementation("androidx.compose.foundation:foundation") - implementation("androidx.compose.foundation:foundation-layout") - implementation("androidx.compose.ui:ui-graphics") - implementation("androidx.compose.ui:ui-text") - implementation("androidx.preference:preference-ktx:1.2.1") - implementation("com.google.android.play:core:1.10.3") - implementation("androidx.compose.ui:ui-tooling") - implementation("androidx.compose.material3:material3") + implementation(libs.androidx.compose.runtime.runtime) + implementation(libs.androidx.ui) + implementation(libs.foundation) + implementation(libs.foundation.layout) + implementation(libs.androidx.ui.graphics) + implementation(libs.androidx.ui.text) + implementation(libs.androidx.preference.ktx) + implementation(libs.play.review.ktx) + implementation(libs.androidx.ui.tooling) + implementation(libs.material3) } \ No newline at end of file diff --git a/non-free/src/main/java/com/wbrawner/simplemarkdown/utility/SupportLinkProvider.kt b/non-free/src/main/java/com/wbrawner/simplemarkdown/utility/SupportLinkProvider.kt index d748668..4ee74c4 100644 --- a/non-free/src/main/java/com/wbrawner/simplemarkdown/utility/SupportLinkProvider.kt +++ b/non-free/src/main/java/com/wbrawner/simplemarkdown/utility/SupportLinkProvider.kt @@ -21,7 +21,7 @@ import com.android.billingclient.api.BillingResult import com.android.billingclient.api.ConsumeParams import com.android.billingclient.api.ProductDetails import com.android.billingclient.api.QueryProductDetailsParams -import com.wbrawner.simplemarkdown.R +import com.wbrawner.simplemarkdown.nonfree.R import timber.log.Timber @Composable diff --git a/settings.gradle.kts b/settings.gradle.kts index 66b7f51..36a339c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1 +1,15 @@ +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} include(":app", ":core", ":free", "non-free")