Skip to content

Commit

Permalink
fixed gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
lucienshema committed Nov 26, 2024
1 parent 8193fea commit 53bfdef
Show file tree
Hide file tree
Showing 13 changed files with 198 additions and 41 deletions.
6 changes: 6 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,14 @@ android {
unitTests {
includeAndroidResources = true
}
animationsDisabled = true
}

sourceSets {
main {
java.srcDirs += "build/generated/ksp/debug/kotlin"
java.srcDirs += "build/generated/ksp/release/kotlin"
named("debug") {
java.srcDir("$buildDir/generated/ksp/debug/kotlin")
}
named("release") {
java.srcDir("$buildDir/generated/ksp/release/kotlin")
}
}

Expand Down Expand Up @@ -233,12 +234,10 @@ dependencies {
androidTestImplementation 'com.google.dagger:hilt-android-testing:2.48'

androidTestImplementation 'androidx.test.ext:junit:1.2.1'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.7.5"
// Align Espresso and Android Test dependencies
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.0"
androidTestImplementation "androidx.test:runner:1.5.0"
androidTestImplementation "androidx.test:rules:1.5.0"

debugImplementation("androidx.compose.ui:ui-test-manifest:1.7.5")
//
// implementation("group:artifact") {
// exclude group: "org.junit.jupiter", module: "junit-jupiter-engine"
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import org.mockito.Mockito.verify
import org.technoserve.farmcollector.ui.screens.settings.LanguageSelector
import org.technoserve.farmcollector.viewmodels.LanguageViewModel

/*
// Mock Language class
data class Language(val displayName: String)
Expand Down Expand Up @@ -113,4 +114,6 @@ class LanguageSelectorKtTest{
"French"
), mockContext) }
}
}
}
*/
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class FarmCollectorApp : Application() {
override fun onCreate() {
super.onCreate()
ContextProvider.initialize(this)
// initializeWorkManager()
initializeWorkManager()
}

// private
fun initializeWorkManager() {
private fun initializeWorkManager() {
val workRequest = PeriodicWorkRequestBuilder<SyncWorker>(2, TimeUnit.HOURS)
.setConstraints(
Constraints.Builder()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.technoserve.farmcollector.database.dao

import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
Expand All @@ -9,6 +10,7 @@ import androidx.room.Transaction
import androidx.room.Update
import org.technoserve.farmcollector.database.models.CollectionSite

@Dao
interface CollectionSiteDAO {


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.technoserve.farmcollector

/*
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.work.Constraints
import androidx.work.ExistingPeriodicWorkPolicy
Expand Down Expand Up @@ -87,4 +88,4 @@ class FarmCollectorAppTest {
}
}
}
}*/
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.technoserve.farmcollector

/*
import android.Manifest
import android.app.Application
import android.content.SharedPreferences
Expand Down Expand Up @@ -169,3 +170,4 @@ class MainActivityKtTest {
// }
// }
}
*/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package org.technoserve.farmcollector

/*
import dagger.hilt.android.testing.HiltAndroidRule
import junit.framework.TestCase.assertEquals
import org.junit.Before
Expand Down Expand Up @@ -36,3 +36,4 @@ class MapViewModelKtTest {
assertEquals("zone-0", clusterItems.last().id)
}
}
*/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package org.technoserve.farmcollector.database.models

/*
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.room.Room
import androidx.test.core.app.ApplicationProvider
Expand Down Expand Up @@ -146,4 +146,5 @@ class CollectionSiteTest{
assertEquals(createdAt, retrievedSite?.createdAt)
assertEquals(updatedAt, retrievedSite?.updatedAt)
}
}
}
*/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package org.technoserve.farmcollector.ui.screens

/*
import android.content.Context
import android.content.res.Configuration
import android.os.Build
Expand Down Expand Up @@ -157,3 +157,4 @@ class AddSiteKtTest {
}
}
}
*/
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.robolectric.annotation.Config
import org.technoserve.farmcollector.database.models.Language
import org.technoserve.farmcollector.viewmodels.LanguageViewModel


/*
//@RunWith(RobolectricTestRunner::class)
//@Config(sdk = [33])
@RunWith(AndroidJUnit4::class)
Expand Down Expand Up @@ -153,4 +153,6 @@ class HomeKtTest{
// Assert: Verify that the "Developed by" text is displayed
composeTestRule.onNodeWithText("Developed by").assertIsDisplayed()
}
}
}
*/
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import org.robolectric.annotation.Config
import org.technoserve.farmcollector.database.models.Farm
import org.technoserve.farmcollector.repositories.FarmRepository


/*
//@RunWith(RobolectricTestRunner::class)
//@Config(sdk = [33])
class FarmViewModelTest {
Expand Down Expand Up @@ -172,3 +172,5 @@ class FarmViewModelTest {
)
}
}
*/
Loading

0 comments on commit 53bfdef

Please sign in to comment.