diff --git a/README.md b/README.md
index 7405169..25efe9c 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ buildscript {
}
dependencies {
- classpath 'com.jeppeman.mockposable:mockposable-gradle:0.6'
+ classpath 'com.jeppeman.mockposable:mockposable-gradle:0.7'
}
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index b868815..39712da 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,9 +1,10 @@
[versions]
-kotlin = '1.9.0'
-compose-ui = '1.4.3'
-compose-compiler = '1.5.1'
-google-ksp = '1.9.0-1.0.13'
-activity = '1.6.1'
+kotlin = '1.9.22'
+compose-ui = '1.5.4'
+compose-compiler = '1.5.8'
+google-ksp = '1.9.22-1.0.16'
+activity = '1.8.2'
+agp = '8.2.1'
espresso = '3.4.0'
hamcrest = '2.2'
mockk = '1.13.2'
@@ -30,14 +31,15 @@ compose-foundation = { module = 'androidx.compose.foundation:foundation', versio
compose-ui-test-junit4 = { module = 'androidx.compose.ui:ui-test-junit4', version.ref = 'compose-ui' }
compose-ui-test-manifest = { module = 'androidx.compose.ui:ui-test-manifest', version.ref = 'compose-ui' }
-android-gradle = { module = 'com.android.tools.build:gradle', version = '7.4.1' }
+android-gradle = { module = 'com.android.tools.build:gradle', version.ref = 'agp' }
autoservice-ksp = { module = 'dev.zacsweers.autoservice:auto-service-ksp', version = '1.0.0' }
autoservice-annotations = { module = 'com.google.auto.service:auto-service-annotations', version = '1.0.1' }
google-ksp = { module = 'com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin', version.ref = 'google-ksp' }
-compile-testing = { module = 'com.github.tschuchortdev:kotlin-compile-testing', version = '1.5.0' }
+# compile-testing = { module = 'com.github.tschuchortdev:kotlin-compile-testing', version = '1.5.0' }
+compile-testing = { module = 'dev.zacsweers.kctfork:core', version = '0.4.0' }
junit = { module = 'androidx.test.ext:junit', version = '1.1.3' }
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index bb238b4..ba77de6 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Tue Oct 18 11:21:10 CEST 2022
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
diff --git a/integration-tests/android/build.gradle.kts b/integration-tests/android/build.gradle.kts
index 06b842b..2928777 100644
--- a/integration-tests/android/build.gradle.kts
+++ b/integration-tests/android/build.gradle.kts
@@ -15,7 +15,8 @@ mockposable {
}
android {
- compileSdk = 33
+ compileSdk = 34
+ namespace = "com.jeppeman.mockposable.integrationtests.android"
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -37,6 +38,7 @@ android {
buildFeatures {
compose = true
+ buildConfig = true
}
testOptions {
diff --git a/integration-tests/android/src/main/AndroidManifest.xml b/integration-tests/android/src/main/AndroidManifest.xml
deleted file mode 100644
index 22c596e..0000000
--- a/integration-tests/android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/mockposable/mockposable-compiler/src/test/java/com/jeppeman/mockposable/compiler/MockposableCompilerTest.kt b/mockposable/mockposable-compiler/src/test/java/com/jeppeman/mockposable/compiler/MockposableCompilerTest.kt
index eb35798..6bf6ab5 100644
--- a/mockposable/mockposable-compiler/src/test/java/com/jeppeman/mockposable/compiler/MockposableCompilerTest.kt
+++ b/mockposable/mockposable-compiler/src/test/java/com/jeppeman/mockposable/compiler/MockposableCompilerTest.kt
@@ -2,6 +2,7 @@ package com.jeppeman.mockposable.compiler
import androidx.compose.compiler.plugins.kotlin.ComposeCommandLineProcessor
import androidx.compose.compiler.plugins.kotlin.ComposePluginRegistrar
+import com.tschuchort.compiletesting.CompilationResult
import com.tschuchort.compiletesting.KotlinCompilation
import com.tschuchort.compiletesting.PluginOption
import com.tschuchort.compiletesting.SourceFile
@@ -10,6 +11,7 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
+@OptIn(ExperimentalCompilerApi::class)
class MockposableCompilerTest {
@Test
fun `GIVEN mockk plugin applied WHEN compiling THEN should compile successfully`() {
@@ -85,16 +87,14 @@ fun main() {
fun compile(
sourceFiles: List,
vararg plugins: String,
-): KotlinCompilation.Result {
+): CompilationResult {
val mockposableCommandLineProcessor = MockposableCommandLineProcessor()
val composeCommandLineProcessor = ComposeCommandLineProcessor()
return KotlinCompilation().apply {
languageVersion = "1.8"
sources = sourceFiles
- useIR = true
commandLineProcessors = listOf(mockposableCommandLineProcessor, composeCommandLineProcessor)
- componentRegistrars = listOf(MockposablePlugin())
- compilerPluginRegistrars = listOf(ComposePluginRegistrar())
+ componentRegistrars = listOf(ComposePluginRegistrar(), MockposablePlugin())
pluginOptions = listOf(
PluginOption(
pluginId = mockposableCommandLineProcessor.pluginId,
@@ -106,9 +106,10 @@ fun compile(
}.compile()
}
+@OptIn(ExperimentalCompilerApi::class)
fun compile(
sourceFile: SourceFile,
vararg plugins: String
-): KotlinCompilation.Result {
+): CompilationResult {
return compile(listOf(sourceFile), *plugins)
}
\ No newline at end of file
diff --git a/mockposable/mockposable-runtime/mockposable-runtime-composeui/build.gradle.kts b/mockposable/mockposable-runtime/mockposable-runtime-composeui/build.gradle.kts
index b8fbea3..c49ebf8 100644
--- a/mockposable/mockposable-runtime/mockposable-runtime-composeui/build.gradle.kts
+++ b/mockposable/mockposable-runtime/mockposable-runtime-composeui/build.gradle.kts
@@ -15,7 +15,8 @@ plugins {
}
android {
- compileSdk = 33
+ compileSdk = 34
+ namespace = "com.jeppeman.mockposable.composeui"
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
diff --git a/mockposable/mockposable-runtime/mockposable-runtime-composeui/src/main/AndroidManifest.xml b/mockposable/mockposable-runtime/mockposable-runtime-composeui/src/main/AndroidManifest.xml
deleted file mode 100644
index f98cabd..0000000
--- a/mockposable/mockposable-runtime/mockposable-runtime-composeui/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
\ No newline at end of file