diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 5d21155..b9ee9ec 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -4,14 +4,14 @@ plugins { alias(libs.plugins.android.application) kotlin("android") alias(libs.plugins.cashapp.redwood) - id("com.github.build.logic") + id("com.jithub.build.logic") } android { - namespace = "com.github.app.android" + namespace = "com.jithub.app.android" compileSdk = Versions.compileSdk defaultConfig { - applicationId = "com.github.app.android" + applicationId = "com.jithub.app.android" minSdk = Versions.minSdk targetSdk = Versions.targetSdk versionCode = Versions.versionCode diff --git a/androidApp/src/main/java/com/github/app/android/AppTheme.kt b/androidApp/src/main/java/com/github/app/android/AppTheme.kt index 0bf59f3..5404d71 100644 --- a/androidApp/src/main/java/com/github/app/android/AppTheme.kt +++ b/androidApp/src/main/java/com/github/app/android/AppTheme.kt @@ -1,4 +1,4 @@ -package com.github.app.android +package com.jithub.app.android import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.shape.RoundedCornerShape diff --git a/androidApp/src/main/java/com/github/app/android/MainActivity.kt b/androidApp/src/main/java/com/github/app/android/MainActivity.kt index dcdca34..d0c6cc6 100644 --- a/androidApp/src/main/java/com/github/app/android/MainActivity.kt +++ b/androidApp/src/main/java/com/github/app/android/MainActivity.kt @@ -1,4 +1,4 @@ -package com.github.app.android +package com.jithub.app.android import android.os.Bundle import androidx.activity.ComponentActivity @@ -13,11 +13,11 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import app.cash.redwood.composeui.RedwoodContent import app.cash.redwood.layout.composeui.ComposeUiRedwoodLayoutWidgetFactory -import com.github.app.shared.Counter -import com.github.app.shared.MR -import com.github.app.shared.core.StringList -import com.github.app.shared.redwood.composeui.ComposeUiWidgetFactory -import com.github.app.shared.redwood.widget.SchemaWidgetSystem +import com.jithub.app.shared.Counter +import com.jithub.app.shared.MR +import com.jithub.app.shared.core.StringList +import com.jithub.app.shared.redwood.composeui.ComposeUiWidgetFactory +import com.jithub.app.shared.redwood.widget.SchemaWidgetSystem class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts index 6734e40..c6e002c 100644 --- a/build-logic/convention/build.gradle.kts +++ b/build-logic/convention/build.gradle.kts @@ -14,7 +14,7 @@ repositories { } } -group = "com.github.app.buildlogic" +group = "com.jithub.app.buildlogic" kotlin { jvmToolchain(17) @@ -33,7 +33,7 @@ dependencies { gradlePlugin { plugins { register("build-logic") { - id = "com.github.build.logic" + id = "com.jithub.build.logic" implementationClass = "BuildLogic" } } diff --git a/build.gradle.kts b/build.gradle.kts index 55a5256..56bf346 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,19 +24,54 @@ plugins { alias(libs.plugins.kotlin.cocoapods) apply false // alias(libs.plugins.jetbrains.compose) apply false alias(libs.plugins.cashapp.redwood) apply false - id("com.github.build.logic") apply false + id("com.jithub.build.logic") apply false } -subprojects { - tasks.withType { +allprojects { + repositories { + google { + mavenContent { + includeGroupAndSubgroups("androidx") + includeGroupAndSubgroups("com.android") + includeGroupAndSubgroups("com.google") + } + } + mavenCentral() + maven("https://jitpack.io") + } + + tasks.withType().configureEach { sourceCompatibility = Versions.java.toString() targetCompatibility = Versions.java.toString() } - tasks.withType { + tasks.withType().configureEach { kotlinOptions { jvmTarget = Versions.java.toString() } + compilerOptions { + // Treat all Kotlin warnings as errors + allWarningsAsErrors = true + freeCompilerArgs.addAll( + // Enable default methods in interfaces + "-Xjvm-default=all", + // Enable context receivers + "-Xcontext-receivers", + // Enable K2 compiler + "-language-version=2.0", + "-Xsuppress-version-warnings" + ) + } + } +} + +gradle.taskGraph.whenReady { + tasks.forEach { task -> + /* Encountering the “Unable to make progress running work” Error in Gradle? */ + // gradle.startParameter.excludedTaskNames.addAll(listOf(":build-logic:convention:testClasses")) + if (task?.name?.contains(":testClasses", ignoreCase = false) == true) { + task.enabled = false + } } } diff --git a/iosApp/Configuration/Config.xcconfig b/iosApp/Configuration/Config.xcconfig index 51411c0..0170aad 100644 --- a/iosApp/Configuration/Config.xcconfig +++ b/iosApp/Configuration/Config.xcconfig @@ -1,3 +1,3 @@ TEAM_ID= -BUNDLE_ID=com.github.app.ios +BUNDLE_ID=com.jithub.app.ios APP_NAME=kmp-app diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index 626a0f0..8f8d229 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -153,7 +153,7 @@ BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1130; LastUpgradeCheck = 1530; - ORGANIZATIONNAME = github.com; + ORGANIZATIONNAME = jithub.com; TargetAttributes = { 7555FF7A242A565900829871 = { CreatedOnToolsVersion = 11.3.1; diff --git a/iosApp/iosApp/AppDelegate.swift b/iosApp/iosApp/AppDelegate.swift index f20c204..21862ae 100644 --- a/iosApp/iosApp/AppDelegate.swift +++ b/iosApp/iosApp/AppDelegate.swift @@ -3,7 +3,7 @@ // iosApp // // Created by syxc on 2024/5/9. -// Copyright © 2024 github.com. All rights reserved. +// Copyright © 2024 jithub.com. All rights reserved. // import shared diff --git a/iosApp/iosApp/CounterViewController.swift b/iosApp/iosApp/CounterViewController.swift index 3e767d5..7d35d47 100644 --- a/iosApp/iosApp/CounterViewController.swift +++ b/iosApp/iosApp/CounterViewController.swift @@ -3,7 +3,7 @@ // iosApp // // Created by syxc on 2024/5/9. -// Copyright © 2024 github.com. All rights reserved. +// Copyright © 2024 jithub.com. All rights reserved. // import Foundation diff --git a/iosApp/iosApp/HomeViewController.swift b/iosApp/iosApp/HomeViewController.swift index d9195b8..6595d9c 100644 --- a/iosApp/iosApp/HomeViewController.swift +++ b/iosApp/iosApp/HomeViewController.swift @@ -3,7 +3,7 @@ // iosApp // // Created by syxc on 2024/5/9. -// Copyright © 2024 github.com. All rights reserved. +// Copyright © 2024 jithub.com. All rights reserved. // import SwiftUI diff --git a/iosApp/iosApp/Launch Screen.storyboard b/iosApp/iosApp/Launch Screen.storyboard index fcbcbb7..65cbe48 100644 --- a/iosApp/iosApp/Launch Screen.storyboard +++ b/iosApp/iosApp/Launch Screen.storyboard @@ -16,7 +16,7 @@ -