Skip to content

Commit 1f1b43d

Browse files
committed
Adding plugin test tools
1 parent 87fc74f commit 1f1b43d

File tree

5 files changed

+6
-15
lines changed

5 files changed

+6
-15
lines changed

android-resource-locator-test/build.gradle

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
plugins {
22
alias(libs.plugins.java.library)
3+
alias(libs.plugins.androidTestTools)
34
id 'java-gradle-plugin'
45
}
56

67
dependencies {
78
implementation project(':string-android-resource-locator')
8-
compileOnly("com.android.tools.build:gradle:3.3.3")
9-
compileOnly libs.dagger
10-
testImplementation "com.likethesalad.tools.testing:android-gradle:$testingUtilities_version"
9+
testPluginClasspath "com.android.tools.build:gradle:7.4.0"
10+
testPluginClasspath libs.dagger
1111
}
1212

1313
libConventions {
1414
setJavaVersion("11")
1515
}
1616

17-
tasks.withType(PluginUnderTestMetadata).configureEach {
18-
pluginClasspath.from(configurations.compileOnly)
19-
}
20-
2117
gradlePlugin {
2218
plugins {
2319
publisher {

android-resource-locator-test/src/test/java/com/likethesalad/tools/resource/locator/android/test/data/PluginGradleBlockItem.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.likethesalad.tools.resource.locator.android.test.data
22

3-
import com.likethesalad.tools.functional.testing.app.layout.GradleBlockItem
3+
import com.likethesalad.tools.functional.testing.blocks.GradleBlockItem
44

55
class PluginGradleBlockItem(private val locatorName: String) : GradleBlockItem {
66

android-resource-locator/src/main/java/com/likethesalad/tools/resource/locator/android/AndroidResourceLocatorPlugin.kt

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ abstract class AndroidResourceLocatorPlugin : AndroidBridgePluginConsumer(), Tas
3535
internal lateinit var androidExtension: AndroidExtension
3636

3737
override fun apply(project: Project) {
38+
super.apply(project)
3839
this.project = project
3940
androidExtension = androidBridge.androidExtension
4041
ResourceLocatorComponentProvider.init(this)

build.gradle

-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ plugins {
22
alias(libs.plugins.artifactPublisher)
33
}
44

5-
ext {
6-
dagger_version = '2.39.1'
7-
gson_version = '2.8.7'
8-
testingUtilities_version = '1.0.5'
9-
androidTools_version = '1.4.0'
10-
}
11-
125
artifactPublisher {
136
displayName = "Resource locator"
147
url = "https://github.com/LikeTheSalad/resource-locator"

gradle/libs.versions.toml

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ pluginTools = { module = "com.likethesalad.tools:plugin-tools", version.ref = "p
1313
[plugins]
1414
java-library = { id = "com.likethesalad.tools.java-library", version.ref = "project-utilities" }
1515
artifactPublisher = { id = "com.likethesalad.artifact-publisher", version = "3.0.0" }
16+
androidTestTools = { id = "com.likethesalad.tools.android-compilation-testing", version.ref = "project-utilities" }

0 commit comments

Comments
 (0)