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

use ksp for dagger #1323

Open
wants to merge 9 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: 6 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ plugins {
alias libs.plugins.google.services
alias libs.plugins.firebase.crashlytics
alias libs.plugins.jetbrains.kotlin.android
alias libs.plugins.jetbrains.kotlin.kapt
alias libs.plugins.jetbrains.kotlin.parcelize
alias libs.plugins.ksp
}

android {
hilt {
enableAggregatingTask = true
}

defaultConfig {
applicationId "com.litus_animae.refitted"
minSdkVersion 26
Expand All @@ -25,12 +28,6 @@ android {
arg("room.schemaLocation", "$projectDir/schemas".toString())
arg("room.expandProjection", "true")
}

javaCompileOptions {
annotationProcessorOptions {
arguments += []
}
}
}
buildTypes {
release {
Expand Down Expand Up @@ -79,7 +76,6 @@ android {
dependencies {

implementation libs.androidx.activity
implementation libs.androidx.annotation
implementation libs.androidx.appcompat
implementation libs.guava
implementation libs.javax.inject
Expand Down Expand Up @@ -116,9 +112,8 @@ dependencies {
implementation libs.dagger
implementation libs.dagger.hilt.android
implementation libs.dagger.hilt.core
kapt libs.dagger.compiler
kapt libs.dagger.hilt.android.compiler
annotationProcessor libs.dagger.hilt.android.compiler
ksp libs.dagger.compiler
ksp libs.dagger.hilt.android.compiler
ksp libs.androidx.hilt.compiler

implementation libs.androidx.hilt.navigation.compose
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.litus_animae.refitted;

import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

Expand All @@ -14,12 +12,11 @@
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

assertEquals("com.litus_animae.refitted", appContext.getPackageName());
}
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ plugins {
alias libs.plugins.google.services apply false
alias libs.plugins.firebase.crashlytics apply false
alias libs.plugins.jetbrains.kotlin.android apply false
alias libs.plugins.jetbrains.kotlin.kapt apply false
alias libs.plugins.jetbrains.kotlin.parcelize apply false
alias libs.plugins.ksp apply false
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
org.gradle.warning.mode=fail
kapt.incremental.apt=true
org.gradle.caching=true
# must be removed to analyze dependencies
Expand Down
5 changes: 1 addition & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[versions]
accompanistAdaptive = "0.34.0"
activity = "1.9.3"
annotation = "1.9.1"
appcompat = "1.7.0"
arrowStack = "1.2.4"
aws = "2.77.0"
composeBom = "2024.12.01"
coreRuntime = "2.2.0"
credentials = "1.3.0"
dagger = "2.52"
dagger = "2.54"
dependencyAnalysis = "2.6.1"
firebaseBom = "33.7.0"
firebaseCrashlytics = "3.0.2"
Expand Down Expand Up @@ -39,7 +38,6 @@ lifecycleRuntimeComposeAndroid = "2.8.7"
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanistAdaptive" }
androidx-activity = { module = "androidx.activity:activity", version.ref = "activity" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity" }
androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
Expand Down Expand Up @@ -118,6 +116,5 @@ dependency-analysis = { id = "com.autonomousapps.dependency-analysis", version.r
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlytics" }
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
jetbrains-kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
jetbrains-kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
Loading