Added more tweaks to convention plugins setup
This commit is contained in:
1 parent
c1966442a7
commit
082b52c58b
14 files changed
+84
-273
No files matched your search
@@ -1,7 +1,3 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.convention.androidAppPlugin)
|
alias(libs.plugins.convention.androidAppPlugin)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
|
||||||
namespace = "com.rtbishop.look4sat"
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
import org.gradle.initialization.DependenciesAccessors
|
import org.gradle.initialization.DependenciesAccessors
|
||||||
import org.gradle.kotlin.dsl.support.serviceOf
|
import org.gradle.kotlin.dsl.support.serviceOf
|
||||||
|
|
||||||
//import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`kotlin-dsl`
|
`kotlin-dsl`
|
||||||
}
|
}
|
||||||
@@ -10,7 +8,6 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(libs.android.gradlePlugin)
|
compileOnly(libs.android.gradlePlugin)
|
||||||
compileOnly(libs.kotlin.gradlePlugin)
|
compileOnly(libs.kotlin.gradlePlugin)
|
||||||
|
|
||||||
gradle.serviceOf<DependenciesAccessors>().classes.asFiles.forEach {
|
gradle.serviceOf<DependenciesAccessors>().classes.asFiles.forEach {
|
||||||
compileOnly(files(it.absolutePath))
|
compileOnly(files(it.absolutePath))
|
||||||
}
|
}
|
||||||
@@ -25,21 +22,6 @@ tasks {
|
|||||||
|
|
||||||
group = "com.rtbishop.look4sat.build_logic.convention"
|
group = "com.rtbishop.look4sat.build_logic.convention"
|
||||||
|
|
||||||
//kotlin {
|
|
||||||
// jvmToolchain(libs.versions.jdkVersion.get().toInt())
|
|
||||||
//}
|
|
||||||
|
|
||||||
//java {
|
|
||||||
// sourceCompatibility = JavaVersion.VERSION_17
|
|
||||||
// targetCompatibility = JavaVersion.VERSION_17
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//tasks.withType<KotlinCompile>().configureEach {
|
|
||||||
// kotlinOptions {
|
|
||||||
// jvmTarget = JavaVersion.VERSION_17.toString()
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
plugins {
|
plugins {
|
||||||
register("androidAppPlugin") {
|
register("androidAppPlugin") {
|
||||||
|
|||||||
+6
-21
@@ -17,44 +17,29 @@
|
|||||||
*/
|
*/
|
||||||
package com.rtbishop.look4sat.convention
|
package com.rtbishop.look4sat.convention
|
||||||
|
|
||||||
import com.android.build.api.dsl.ApplicationExtension
|
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.kotlin.dsl.configure
|
|
||||||
import org.gradle.kotlin.dsl.dependencies
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
|
|
||||||
@Suppress("Unused")
|
@Suppress("Unused")
|
||||||
class AndroidAppPlugin : Plugin<Project> {
|
internal class AndroidAppPlugin : Plugin<Project> {
|
||||||
override fun apply(target: Project) {
|
override fun apply(target: Project) {
|
||||||
with(target) {
|
with(target) {
|
||||||
with(pluginManager) {
|
setupAndroidApplication()
|
||||||
alias(libs.plugins.android.application)
|
setupComposeFeature()
|
||||||
alias(libs.plugins.compose.compiler)
|
setupKotlinToolchain()
|
||||||
}
|
setupAndroidTestDependencies()
|
||||||
configureKotlinLibrary()
|
setupTestDependencies()
|
||||||
extensions.configure<ApplicationExtension> {
|
|
||||||
configureAndroidApp(this)
|
|
||||||
}
|
|
||||||
dependencies {
|
dependencies {
|
||||||
IMPLEMENTATION(project(":core:data"))
|
IMPLEMENTATION(project(":core:data"))
|
||||||
IMPLEMENTATION(project(":core:domain"))
|
IMPLEMENTATION(project(":core:domain"))
|
||||||
IMPLEMENTATION(project(":core:presentation"))
|
IMPLEMENTATION(project(":core:presentation"))
|
||||||
|
|
||||||
IMPLEMENTATION(project(":feature:map"))
|
IMPLEMENTATION(project(":feature:map"))
|
||||||
IMPLEMENTATION(project(":feature:passes"))
|
IMPLEMENTATION(project(":feature:passes"))
|
||||||
IMPLEMENTATION(project(":feature:radar"))
|
IMPLEMENTATION(project(":feature:radar"))
|
||||||
IMPLEMENTATION(project(":feature:satellites"))
|
IMPLEMENTATION(project(":feature:satellites"))
|
||||||
IMPLEMENTATION(project(":feature:settings"))
|
IMPLEMENTATION(project(":feature:settings"))
|
||||||
|
|
||||||
IMPLEMENTATION(libs.androidx.core.splashscreen)
|
IMPLEMENTATION(libs.androidx.core.splashscreen)
|
||||||
IMPLEMENTATION(platform(libs.compose.bom))
|
|
||||||
IMPLEMENTATION(libs.bundles.composeAll)
|
|
||||||
IMPLEMENTATION(libs.other.osmdroid)
|
|
||||||
DEBUG_IMPLEMENTATION(libs.bundles.composeDebug)
|
|
||||||
|
|
||||||
TEST_IMPLEMENTATION(libs.test.coroutines)
|
|
||||||
TEST_IMPLEMENTATION(libs.test.junit4)
|
|
||||||
ANDROID_TEST_IMPLEMENTATION(libs.bundles.androidTest)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-15
@@ -17,39 +17,29 @@
|
|||||||
*/
|
*/
|
||||||
package com.rtbishop.look4sat.convention
|
package com.rtbishop.look4sat.convention
|
||||||
|
|
||||||
import com.android.build.api.dsl.LibraryExtension
|
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.kotlin.dsl.configure
|
|
||||||
import org.gradle.kotlin.dsl.dependencies
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
|
|
||||||
@Suppress("Unused")
|
@Suppress("Unused")
|
||||||
class AndroidLibraryPlugin : Plugin<Project> {
|
internal class AndroidLibraryPlugin : Plugin<Project> {
|
||||||
override fun apply(target: Project) {
|
override fun apply(target: Project) {
|
||||||
with(target) {
|
with(target) {
|
||||||
with(pluginManager) {
|
with(pluginManager) {
|
||||||
alias(libs.plugins.android.library)
|
|
||||||
alias(libs.plugins.google.ksp)
|
alias(libs.plugins.google.ksp)
|
||||||
}
|
}
|
||||||
// setupAndroidModule(isApplication = false)
|
setupCommonLibrary()
|
||||||
// setupBaseDependencies()
|
setupKotlinToolchain()
|
||||||
configureKotlinLibrary()
|
setupAndroidTestDependencies()
|
||||||
extensions.configure<LibraryExtension> {
|
setupTestDependencies()
|
||||||
configureAndroidLibrary(this)
|
|
||||||
}
|
|
||||||
dependencies {
|
dependencies {
|
||||||
IMPLEMENTATION(project(":core:domain"))
|
IMPLEMENTATION(project(":core:domain"))
|
||||||
|
|
||||||
IMPLEMENTATION(libs.androidx.core.ktx)
|
IMPLEMENTATION(libs.androidx.core.ktx)
|
||||||
IMPLEMENTATION(libs.androidx.room.asProvider())
|
IMPLEMENTATION(libs.androidx.room.asProvider())
|
||||||
IMPLEMENTATION(libs.androidx.room.runtime)
|
IMPLEMENTATION(libs.androidx.room.runtime)
|
||||||
KSP(libs.androidx.room.compiler)
|
KSP(libs.androidx.room.compiler)
|
||||||
IMPLEMENTATION(libs.other.coroutines)
|
IMPLEMENTATION(libs.other.coroutines)
|
||||||
IMPLEMENTATION(libs.other.okhttp)
|
IMPLEMENTATION(libs.other.okhttp)
|
||||||
|
|
||||||
TEST_IMPLEMENTATION(libs.test.coroutines)
|
|
||||||
TEST_IMPLEMENTATION(libs.test.junit4)
|
|
||||||
ANDROID_TEST_IMPLEMENTATION(libs.bundles.androidTest)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-31
@@ -17,47 +17,22 @@
|
|||||||
*/
|
*/
|
||||||
package com.rtbishop.look4sat.convention
|
package com.rtbishop.look4sat.convention
|
||||||
|
|
||||||
import com.android.build.api.dsl.LibraryExtension
|
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.kotlin.dsl.configure
|
|
||||||
import org.gradle.kotlin.dsl.dependencies
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
|
|
||||||
@Suppress("Unused")
|
@Suppress("Unused")
|
||||||
class ComposeFeaturePlugin : Plugin<Project> {
|
internal class ComposeFeaturePlugin : Plugin<Project> {
|
||||||
override fun apply(target: Project) {
|
override fun apply(target: Project) {
|
||||||
with(target) {
|
with(target) {
|
||||||
with(pluginManager) {
|
setupCommonLibrary()
|
||||||
alias(libs.plugins.android.library)
|
setupComposeFeature()
|
||||||
alias(libs.plugins.compose.compiler)
|
setupKotlinToolchain()
|
||||||
}
|
setupAndroidTestDependencies()
|
||||||
configureKotlinLibrary()
|
setupTestDependencies()
|
||||||
extensions.configure<LibraryExtension> {
|
|
||||||
configureAndroidLibrary(this)
|
|
||||||
configureComposeFeature(this)
|
|
||||||
}
|
|
||||||
dependencies {
|
dependencies {
|
||||||
IMPLEMENTATION(project(":core:domain"))
|
IMPLEMENTATION(project(":core:domain"))
|
||||||
IMPLEMENTATION(project(":core:presentation"))
|
IMPLEMENTATION(project(":core:presentation"))
|
||||||
|
|
||||||
IMPLEMENTATION(libs.androidx.core.splashscreen)
|
|
||||||
IMPLEMENTATION(platform(libs.compose.bom))
|
|
||||||
IMPLEMENTATION(libs.compose.activity)
|
|
||||||
IMPLEMENTATION(libs.compose.lifecycle)
|
|
||||||
IMPLEMENTATION(libs.compose.navigation)
|
|
||||||
IMPLEMENTATION(libs.compose.viewmodel)
|
|
||||||
IMPLEMENTATION(libs.compose.animation)
|
|
||||||
IMPLEMENTATION(libs.compose.material3)
|
|
||||||
// IMPLEMENTATION(libs.compose.material3.asProvider())
|
|
||||||
IMPLEMENTATION(libs.compose.material3.navigation)
|
|
||||||
IMPLEMENTATION(libs.compose.runtime)
|
|
||||||
IMPLEMENTATION(libs.compose.tooling)
|
|
||||||
IMPLEMENTATION(libs.other.osmdroid)
|
|
||||||
DEBUG_IMPLEMENTATION(libs.bundles.composeDebug)
|
|
||||||
|
|
||||||
TEST_IMPLEMENTATION(libs.test.coroutines)
|
|
||||||
TEST_IMPLEMENTATION(libs.test.junit4)
|
|
||||||
ANDROID_TEST_IMPLEMENTATION(libs.bundles.androidTest)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-31
@@ -17,46 +17,21 @@
|
|||||||
*/
|
*/
|
||||||
package com.rtbishop.look4sat.convention
|
package com.rtbishop.look4sat.convention
|
||||||
|
|
||||||
import com.android.build.api.dsl.LibraryExtension
|
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.kotlin.dsl.configure
|
|
||||||
import org.gradle.kotlin.dsl.dependencies
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
|
|
||||||
@Suppress("Unused")
|
@Suppress("Unused")
|
||||||
class ComposeLibraryPlugin : Plugin<Project> {
|
internal class ComposeLibraryPlugin : Plugin<Project> {
|
||||||
override fun apply(target: Project) {
|
override fun apply(target: Project) {
|
||||||
with(target) {
|
with(target) {
|
||||||
with(pluginManager) {
|
setupCommonLibrary()
|
||||||
alias(libs.plugins.android.library)
|
setupComposeFeature()
|
||||||
alias(libs.plugins.compose.compiler)
|
setupKotlinToolchain()
|
||||||
}
|
setupAndroidTestDependencies()
|
||||||
configureKotlinLibrary()
|
setupTestDependencies()
|
||||||
extensions.configure<LibraryExtension> {
|
|
||||||
configureAndroidLibrary(this)
|
|
||||||
configureComposeFeature(this)
|
|
||||||
}
|
|
||||||
dependencies {
|
dependencies {
|
||||||
IMPLEMENTATION(project(":core:domain"))
|
IMPLEMENTATION(project(":core:domain"))
|
||||||
|
|
||||||
IMPLEMENTATION(libs.androidx.core.splashscreen)
|
|
||||||
IMPLEMENTATION(platform(libs.compose.bom))
|
|
||||||
IMPLEMENTATION(libs.compose.activity)
|
|
||||||
IMPLEMENTATION(libs.compose.lifecycle)
|
|
||||||
IMPLEMENTATION(libs.compose.navigation)
|
|
||||||
IMPLEMENTATION(libs.compose.viewmodel)
|
|
||||||
IMPLEMENTATION(libs.compose.animation)
|
|
||||||
IMPLEMENTATION(libs.compose.material3)
|
|
||||||
// IMPLEMENTATION(libs.compose.material3.asProvider())
|
|
||||||
IMPLEMENTATION(libs.compose.material3.navigation)
|
|
||||||
IMPLEMENTATION(libs.compose.runtime)
|
|
||||||
IMPLEMENTATION(libs.compose.tooling)
|
|
||||||
IMPLEMENTATION(libs.other.osmdroid)
|
|
||||||
DEBUG_IMPLEMENTATION(libs.bundles.composeDebug)
|
|
||||||
|
|
||||||
TEST_IMPLEMENTATION(libs.test.coroutines)
|
|
||||||
TEST_IMPLEMENTATION(libs.test.junit4)
|
|
||||||
ANDROID_TEST_IMPLEMENTATION(libs.bundles.androidTest)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-6
@@ -22,18 +22,17 @@ import org.gradle.api.Project
|
|||||||
import org.gradle.kotlin.dsl.dependencies
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
|
|
||||||
@Suppress("Unused")
|
@Suppress("Unused")
|
||||||
class KotlinLibraryPlugin : Plugin<Project> {
|
internal class KotlinLibraryPlugin : Plugin<Project> {
|
||||||
override fun apply(target: Project) {
|
override fun apply(target: Project) {
|
||||||
with(target) {
|
with(target) {
|
||||||
with(pluginManager) {
|
with(pluginManager) {
|
||||||
alias(libs.plugins.kotlin.jvm)
|
alias(libs.plugins.kotlin.jvm)
|
||||||
}
|
}
|
||||||
configureKotlinLibrary()
|
setupKotlinToolchain()
|
||||||
|
setupTestDependencies()
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.other.coroutines)
|
IMPLEMENTATION(libs.other.coroutines)
|
||||||
implementation(libs.other.json)
|
IMPLEMENTATION(libs.other.json)
|
||||||
testImplementation(libs.test.coroutines)
|
|
||||||
testImplementation(libs.test.junit4)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+44
-135
@@ -18,15 +18,11 @@
|
|||||||
package com.rtbishop.look4sat.convention
|
package com.rtbishop.look4sat.convention
|
||||||
|
|
||||||
import com.android.build.api.dsl.ApplicationExtension
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
import com.android.build.api.dsl.LibraryExtension
|
import com.android.build.api.dsl.CommonExtension
|
||||||
import org.gradle.accessors.dm.LibrariesForLibs
|
import org.gradle.accessors.dm.LibrariesForLibs
|
||||||
import org.gradle.api.JavaVersion
|
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.artifacts.MinimalExternalModuleDependency
|
|
||||||
import org.gradle.api.artifacts.dsl.DependencyHandler
|
|
||||||
import org.gradle.api.plugins.PluginManager
|
import org.gradle.api.plugins.PluginManager
|
||||||
import org.gradle.api.provider.Provider
|
import org.gradle.api.provider.Provider
|
||||||
import org.gradle.api.provider.ProviderConvertible
|
|
||||||
import org.gradle.kotlin.dsl.accessors.runtime.extensionOf
|
import org.gradle.kotlin.dsl.accessors.runtime.extensionOf
|
||||||
import org.gradle.kotlin.dsl.configure
|
import org.gradle.kotlin.dsl.configure
|
||||||
import org.gradle.kotlin.dsl.dependencies
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
@@ -40,71 +36,21 @@ internal const val KSP = "ksp"
|
|||||||
internal const val TEST_IMPLEMENTATION = "testImplementation"
|
internal const val TEST_IMPLEMENTATION = "testImplementation"
|
||||||
|
|
||||||
internal val Project.libs
|
internal val Project.libs
|
||||||
// get(): VersionCatalog = extensions.getByType<VersionCatalogsExtension>().named("libs")
|
|
||||||
get(): LibrariesForLibs = extensionOf(this, "libs") as LibrariesForLibs
|
get(): LibrariesForLibs = extensionOf(this, "libs") as LibrariesForLibs
|
||||||
|
|
||||||
internal fun Project.configureKotlinLibrary() {
|
internal fun PluginManager.alias(notation: Provider<PluginDependency>) {
|
||||||
// kotlinExtension.jvmToolchain(libs.findVersion("jdkVersion").get().requiredVersion.toInt())
|
|
||||||
kotlinExtension.jvmToolchain(libs.versions.jdkVersion.get().toInt())
|
|
||||||
// tasks.withType(AbstractTestTask::class.java).configureEach { setProperty("failOnNoDiscoveredTests", false) }
|
|
||||||
}
|
|
||||||
|
|
||||||
fun PluginManager.alias(notation: Provider<PluginDependency>) {
|
|
||||||
apply(notation.get().pluginId)
|
apply(notation.get().pluginId)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun PluginManager.alias(notation: ProviderConvertible<PluginDependency>) {
|
internal fun Project.setupAndroidApplication() {
|
||||||
apply(notation.asProvider().get().pluginId)
|
with(pluginManager) {
|
||||||
}
|
alias(libs.plugins.android.application)
|
||||||
|
|
||||||
fun DependencyHandler.implementation(provider: Provider<MinimalExternalModuleDependency>) {
|
|
||||||
add("implementation", provider.get().group + ":" + provider.get().name + ":" + provider.get().version)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun DependencyHandler.testImplementation(provider: Provider<MinimalExternalModuleDependency>) {
|
|
||||||
add("testImplementation", provider.get().group + ":" + provider.get().name + ":" + provider.get().version)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun DependencyHandler.ksp(provider: Provider<MinimalExternalModuleDependency>) {
|
|
||||||
add("ksp", provider.get().group + ":" + provider.get().name + ":" + provider.get().version)
|
|
||||||
}
|
|
||||||
|
|
||||||
internal fun Project.configureAndroidLibrary(commonExtension: LibraryExtension) {
|
|
||||||
commonExtension.apply {
|
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
|
||||||
defaultConfig {
|
|
||||||
minSdk = libs.versions.minSdk.get().toInt()
|
|
||||||
}
|
|
||||||
// compileOptions { isCoreLibraryDesugaringEnabled = true }
|
|
||||||
// testOptions {
|
|
||||||
// unitTests {
|
|
||||||
// all { it.useJUnitPlatform() }
|
|
||||||
// isReturnDefaultValues = true
|
|
||||||
// isIncludeAndroidResources = true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// packaging { resources { excludes += listOf("META-INF/*") } }
|
|
||||||
// dependencies {
|
|
||||||
// IMPLEMENTATION(libs.findLibrary("androidx-core").get())
|
|
||||||
// IMPLEMENTATION(libs.findLibrary("kotlinx-serialization-json").get())
|
|
||||||
// IMPLEMENTATION(libs.findLibrary("other-timber").get())
|
|
||||||
// IMPLEMENTATION(libs.findLibrary("google-hilt-android").get())
|
|
||||||
// KSP(libs.findLibrary("google-hilt-compiler").get())
|
|
||||||
//
|
|
||||||
// ANDROID_TEST_IMPLEMENTATION(libs.findBundle("androidTest").get())
|
|
||||||
// ANDROID_TEST_IMPLEMENTATION(libs.findBundle("unitTest").get())
|
|
||||||
// CORE_LIBRARY_DESUGARING(libs.findLibrary("other-desugaring").get())
|
|
||||||
// TEST_IMPLEMENTATION(libs.findBundle("unitTest").get())
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
extensions.configure<ApplicationExtension> {
|
||||||
|
namespace = libs.versions.packageName.get()
|
||||||
internal fun Project.configureAndroidApp(commonExtension: ApplicationExtension) {
|
|
||||||
commonExtension.apply {
|
|
||||||
namespace = "com.rtbishop.look4sat"
|
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.rtbishop.look4sat"
|
applicationId = libs.versions.packageName.get()
|
||||||
minSdk = libs.versions.minSdk.get().toInt()
|
minSdk = libs.versions.minSdk.get().toInt()
|
||||||
versionCode = libs.versions.appVersionCode.get().toInt()
|
versionCode = libs.versions.appVersionCode.get().toInt()
|
||||||
versionName = libs.versions.appVersionName.get()
|
versionName = libs.versions.appVersionName.get()
|
||||||
@@ -126,84 +72,47 @@ internal fun Project.configureAndroidApp(commonExtension: ApplicationExtension)
|
|||||||
generateLocaleConfig = true
|
generateLocaleConfig = true
|
||||||
localeFilters.addAll(listOf("en", "es", "ru", "si", "uk", "zh"))
|
localeFilters.addAll(listOf("en", "es", "ru", "si", "uk", "zh"))
|
||||||
}
|
}
|
||||||
}
|
packaging { resources { excludes += listOf("META-INF/*") } }
|
||||||
// extensions.configure<ApplicationExtension> {
|
|
||||||
// namespace = "com.rtbishop.look4sat"
|
|
||||||
// compileSdk = 36
|
|
||||||
// defaultConfig {
|
|
||||||
// applicationId = "com.rtbishop.look4sat"
|
|
||||||
// minSdk = 24
|
|
||||||
// versionCode = 410
|
|
||||||
// versionName = "4.1.0"
|
|
||||||
// }
|
|
||||||
// buildFeatures {
|
|
||||||
// compose = true
|
|
||||||
// }
|
|
||||||
// buildTypes {
|
|
||||||
// debug {
|
|
||||||
// applicationIdSuffix = ".debug"
|
|
||||||
// }
|
|
||||||
// release {
|
|
||||||
// isMinifyEnabled = true
|
|
||||||
// isShrinkResources = true
|
|
||||||
// proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// androidResources {
|
|
||||||
// generateLocaleConfig = true
|
|
||||||
// localeFilters.addAll(listOf("en", "es", "ru", "si", "uk", "zh"))
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
internal fun Project.configureComposeFeature(commonExtension: LibraryExtension) {
|
|
||||||
commonExtension.apply {
|
|
||||||
buildFeatures { compose = true }
|
|
||||||
// testOptions { animationsDisabled = true }
|
|
||||||
dependencies {
|
|
||||||
// IMPLEMENTATION(platform(libs.findLibrary("compose-bom").get()))
|
|
||||||
// IMPLEMENTATION(libs.findBundle("composeAll").get())
|
|
||||||
//
|
|
||||||
// ANDROID_TEST_IMPLEMENTATION(libs.findBundle("composeDebug").get())
|
|
||||||
// DEBUG_IMPLEMENTATION(libs.findBundle("composeDebug").get())
|
|
||||||
// SCREENSHOT_TEST_IMPLEMENTATION(libs.findLibrary("compose-ui-tooling").get())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Project.setupAndroidModule(isApplication: Boolean) {
|
internal fun Project.setupCommonLibrary() {
|
||||||
with(pluginManager) {
|
with(pluginManager) {
|
||||||
if (isApplication) {
|
alias(libs.plugins.android.library)
|
||||||
alias(libs.plugins.android.application)
|
|
||||||
alias(libs.plugins.compose.compiler)
|
|
||||||
} else {
|
|
||||||
alias(libs.plugins.android.library)
|
|
||||||
alias(libs.plugins.google.ksp)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
extensions.configure<ApplicationExtension> {
|
extensions.configure<CommonExtension> {
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||||
defaultConfig {
|
defaultConfig.minSdk = libs.versions.minSdk.get().toInt()
|
||||||
minSdk = 26
|
}
|
||||||
versionCode = 1
|
}
|
||||||
versionName = "1.0"
|
|
||||||
}
|
internal fun Project.setupComposeFeature() {
|
||||||
compileOptions {
|
with(pluginManager) {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
alias(libs.plugins.compose.compiler)
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
}
|
||||||
}
|
extensions.configure<CommonExtension> {
|
||||||
buildTypes {
|
buildFeatures.compose = true
|
||||||
buildTypes {
|
}
|
||||||
maybeCreate("debug")
|
dependencies {
|
||||||
maybeCreate("release")
|
IMPLEMENTATION(platform(libs.compose.bom))
|
||||||
named("release") {
|
IMPLEMENTATION(libs.bundles.composeAll)
|
||||||
isMinifyEnabled = true
|
DEBUG_IMPLEMENTATION(libs.bundles.composeDebug)
|
||||||
proguardFiles(
|
}
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
}
|
||||||
"proguard-rules.pro"
|
|
||||||
)
|
internal fun Project.setupKotlinToolchain() {
|
||||||
}
|
kotlinExtension.jvmToolchain(libs.versions.jdkVersion.get().toInt())
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
internal fun Project.setupAndroidTestDependencies() {
|
||||||
|
dependencies {
|
||||||
|
ANDROID_TEST_IMPLEMENTATION(libs.bundles.androidTest)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal fun Project.setupTestDependencies() {
|
||||||
|
dependencies {
|
||||||
|
TEST_IMPLEMENTATION(libs.test.coroutines)
|
||||||
|
TEST_IMPLEMENTATION(libs.test.junit4)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
@file:Suppress("UnstableApiUsage")
|
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
@@ -13,4 +11,3 @@ dependencyResolutionManagement {
|
|||||||
}
|
}
|
||||||
rootProject.name = "build-logic"
|
rootProject.name = "build-logic"
|
||||||
include(":convention")
|
include(":convention")
|
||||||
//enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
|
||||||
@@ -5,3 +5,7 @@ plugins {
|
|||||||
android {
|
android {
|
||||||
namespace = "com.rtbishop.look4sat.feature.map"
|
namespace = "com.rtbishop.look4sat.feature.map"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.other.osmdroid)
|
||||||
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
# Configure your build environment: http://www.gradle.org/docs/current/userguide/build_environment.html
|
# Configure your build environment: http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
android.disallowKotlinSourceSets=false
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|||||||
@@ -9,17 +9,19 @@ compileSdk = "36"
|
|||||||
minSdk = "24"
|
minSdk = "24"
|
||||||
#noinspection UnusedVersionCatalogEntry
|
#noinspection UnusedVersionCatalogEntry
|
||||||
jdkVersion = "17"
|
jdkVersion = "17"
|
||||||
|
#noinspection UnusedVersionCatalogEntry
|
||||||
|
packageName = "com.rtbishop.look4sat"
|
||||||
|
|
||||||
android-gradle-plugin = "9.0.1"
|
android-gradle-plugin = "9.0.1"
|
||||||
google-ksp = "2.3.6"
|
google-ksp = "2.3.6"
|
||||||
kotlin = "2.3.10"
|
kotlin = "2.3.20"
|
||||||
|
|
||||||
androidx-core-ktx = "1.17.0"
|
androidx-core-ktx = "1.18.0"
|
||||||
androidx-core-splashscreen = "1.2.0"
|
androidx-core-splashscreen = "1.2.0"
|
||||||
androidx-room = "2.8.4"
|
androidx-room = "2.8.4"
|
||||||
|
|
||||||
compose-bom = "2026.02.01"
|
compose-bom = "2026.03.00"
|
||||||
compose-activity = "1.12.4"
|
compose-activity = "1.13.0"
|
||||||
compose-lifecycle = "2.10.0"
|
compose-lifecycle = "2.10.0"
|
||||||
compose-navigation = "2.9.7"
|
compose-navigation = "2.9.7"
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
#Fri Jan 30 17:28:14 GMT 2026
|
#Fri Mar 13 09:30:16 GMT 2026
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
@file:Suppress("UnstableApiUsage")
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
includeBuild("build-logic")
|
includeBuild("build-logic")
|
||||||
repositories {
|
repositories {
|
||||||
@@ -28,4 +27,3 @@ include(
|
|||||||
":feature:satellites",
|
":feature:satellites",
|
||||||
":feature:settings"
|
":feature:settings"
|
||||||
)
|
)
|
||||||
//enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
|
||||||
Reference in new issue
Block a user