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

Updated gradle plugin, to run on latest Android Studio #7

Open
wants to merge 1 commit into
base: main
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
9 changes: 5 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.dagger.hilt.android")
id("org.jetbrains.kotlin.plugin.compose")
kotlin("kapt")
}

Expand Down Expand Up @@ -40,11 +41,11 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "11"
}

buildFeatures {
Expand All @@ -55,7 +56,7 @@ android {
kotlinCompilerExtensionVersion = AppConfig.KotlinCompilerExtension
}

packagingOptions {
packaging {
resources.excludes.add("META-INF/**/*")
}
}
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ repositories {
}

dependencies {
implementation("com.android.tools.build:gradle:7.2.2")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10")
implementation("com.google.dagger:hilt-android-gradle-plugin:2.44.2")

implementation("com.android.tools.build:gradle:8.5.2")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20")
implementation("com.google.dagger:hilt-android-gradle-plugin:2.52")
implementation("org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin:2.0.20")
}
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/AppConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/
object AppConfig {
const val minSdk = 21
const val targetSdk = 33
const val compileSdk = 33
const val targetSdk = 34
const val compileSdk = 34
const val versionCode = 1
const val VersionName = "1.0.0"
const val KotlinCompilerExtension="1.4.2"
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/java/DependencyHandler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ fun DependencyHandler.accompanistDependencies() {
}

fun DependencyHandler.testDependencies() {
testImplementation(Libraries.Test.junit)
androidTestImplementation(Libraries.Test.testCoreKtx)
androidTestImplementation(Libraries.Test.espressorCore)
androidTestImplementation(Libraries.Test.runner)
Expand Down
11 changes: 7 additions & 4 deletions buildSrc/src/main/java/Libraries.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Version.GsonVersion
import Version.GuavaAndroid
import Version.HiltAndroidVersion
import Version.HiltNavigationCompose
import Version.Junit
import Version.JunitExtKtx
import Version.LifecycleRunTimeKtx
import Version.Media3
Expand All @@ -20,22 +21,23 @@ import Version.TruthExt
* Created by Puskal Khadka on 3/14/2023.
*/
object Version {
const val CoreKtx = "1.9.0"
const val AppCompat = "1.6.1"
const val CoreKtx = "1.13.1"
const val AppCompat = "1.7.0"
const val ComposeBom = "2023.01.00"
const val LifecycleRunTimeKtx = "2.3.1"
const val NavigationCompose = "2.5.3"
const val AndroidXTestVersion = "1.5.0"
const val EspressoCore = "3.5.1"
const val TestRunnerVersion = "1.5.2"
const val Junit = "4.12"
const val JunitExtKtx = "1.1.5"
const val TruthExt = "1.5.0"
const val Coil = "2.2.2"
const val HiltNavigationCompose = "1.0.0"
const val HiltAndroidVersion = "2.44"
const val HiltAndroidVersion = "2.52"
const val Media3 = "1.0.0-rc02"
const val Accompanist = "0.28.0"
const val SplashScreenApi = "1.1.0-alpha01"
const val SplashScreenApi = "1.0.1"
const val ConstraintLayoutCompose = "1.0.1"
const val GsonVersion = "2.10.1"
const val CameraXVersion = "1.3.0-alpha05"
Expand Down Expand Up @@ -107,6 +109,7 @@ object Libraries {
const val testCoreKtx = "androidx.test:core-ktx:$AndroidXTestVersion"
const val espressorCore = "androidx.test.espresso:espresso-core:$EspressoCore"
const val junitExtKtx = "androidx.test.ext:junit-ktx:$JunitExtKtx"
const val junit = "junit:junit:$Junit"
const val truthExt = "androidx.test.ext:truth:$TruthExt"
const val runner = "androidx.test:runner:$TestRunnerVersion"
}
Expand Down
10 changes: 5 additions & 5 deletions buildSrc/src/main/java/plugin/android-common.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.parcelize")
id("org.jetbrains.kotlin.plugin.compose")
id("com.google.dagger.hilt.android")
kotlin("kapt")
}
Expand All @@ -18,7 +19,6 @@ android {
compileSdk = AppConfig.compileSdk
defaultConfig {
minSdk = AppConfig.minSdk
targetSdk = AppConfig.targetSdk
consumerProguardFiles ("consumer-rules.pro")
}

Expand All @@ -28,12 +28,12 @@ android {
release {}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "11"
}

buildFeatures {
Expand All @@ -44,7 +44,7 @@ android {
kotlinCompilerExtensionVersion = AppConfig.KotlinCompilerExtension
}

packagingOptions {
packaging {
resources.excludes.apply {
add("META-INF/AL2.0")
add("META-INF/LGPL2.1")
Expand Down
5 changes: 3 additions & 2 deletions common/composable/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("plugin.android-common")
}


android {
namespace = "com.puskal.composable"
}
dependencies {
COMMON_THEME
DOMAIN
Expand Down
5 changes: 3 additions & 2 deletions common/theme/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("plugin.android-common")
}


android {
namespace = "com.puskal.theme"
}
dependencies {

}
3 changes: 3 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.core"
}

dependencies {
}
3 changes: 3 additions & 0 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.data"
}

dependencies {
CORE
Expand Down
3 changes: 3 additions & 0 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.domain"
}

dependencies {
DATA
Expand Down
3 changes: 3 additions & 0 deletions feature/authentication/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.authentication"
}

dependencies {
COMMON_THEME
Expand Down
4 changes: 4 additions & 0 deletions feature/cameramedia/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.cameramedia"
}

dependencies {
COMMON_THEME
Expand All @@ -10,4 +13,5 @@ dependencies {
DATA
CORE
cameraXDependencies()
testDependencies()
}
3 changes: 3 additions & 0 deletions feature/commentlisting/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.commentlisting"
}

dependencies {
COMMON_THEME
Expand Down
3 changes: 3 additions & 0 deletions feature/creatorprofile/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.creatorprofile"
}

dependencies {
COMMON_THEME
Expand Down
4 changes: 4 additions & 0 deletions feature/friends/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.friends"
}

dependencies {
COMMON_THEME
COMMON_COMPOSABLE
Expand Down
3 changes: 3 additions & 0 deletions feature/home/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.home"
}

dependencies {
COMMON_THEME
Expand Down
3 changes: 3 additions & 0 deletions feature/inbox/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.inbox"
}

dependencies {
COMMON_THEME
Expand Down
3 changes: 3 additions & 0 deletions feature/loginwithemailphone/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.loginwithemailphone"
}

dependencies {
COMMON_THEME
Expand Down
3 changes: 3 additions & 0 deletions feature/myprofile/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.myprofile"
}

dependencies {
COMMON_THEME
Expand Down
4 changes: 4 additions & 0 deletions feature/setting/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ plugins {
id("plugin.android-common")
}

android {
namespace = "com.puskal.setting"
}

dependencies {
COMMON_THEME
COMMON_COMPOSABLE
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Mar 14 16:25:09 NPT 2023
#Thu Sep 12 11:26:52 BDT 2024
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading