Skip to content

Commit

Permalink
Revert "Add a new source set to share test kits (#1081)"
Browse files Browse the repository at this point in the history
This reverts commit 6c19205.
  • Loading branch information
Goooler committed Dec 3, 2024
1 parent b7bb178 commit e90a0e5
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 18 deletions.
10 changes: 1 addition & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ spotless {
}
}

val testKit: SourceSet by sourceSets.creating
val testKitImplementation: Configuration by configurations.getting

val intiTest: SourceSet by sourceSets.creating
val intiTestImplementation: Configuration by configurations.getting {
extendsFrom(configurations.testImplementation.get())
Expand Down Expand Up @@ -77,11 +74,6 @@ dependencies {
implementation(libs.plexus.utils)
implementation(libs.plexus.xml)

val mainOutput = sourceSets.main.map { it.output }
testKitImplementation(mainOutput)
testKitImplementation(gradleTestKit())

testImplementation(testKit.output)
testImplementation(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter)
testImplementation(libs.assertk)
Expand All @@ -93,7 +85,7 @@ dependencies {
exclude(group = "org.codehaus.groovy")
exclude(group = "org.hamcrest")
}
funcTestImplementation(mainOutput)
funcTestImplementation(sourceSets.main.get().output)

lintChecks(libs.androidx.gradlePluginLints)
lintChecks(libs.assertk.lint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ package com.github.jengelman.gradle.plugins.shadow.transformers
import com.github.jengelman.gradle.plugins.shadow.transformers.PropertiesFileTransformer.MergeStrategy
import spock.lang.Unroll

import static com.github.jengelman.gradle.plugins.shadow.testkit.util.Utils.testObjectFactory
import static groovy.lang.Closure.IDENTITY

@Unroll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ import com.github.jengelman.gradle.plugins.shadow.ShadowStats
import org.gradle.api.file.FileTreeElement
import org.gradle.api.file.RelativePath
import org.gradle.api.internal.file.DefaultFileTreeElement
import org.gradle.testfixtures.ProjectBuilder
import spock.lang.Shared
import spock.lang.Specification

class TransformerSpecSupport extends Specification {

protected static final def testObjectFactory = ProjectBuilder.builder().build().objects

@Shared
ShadowStats stats

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import assertk.assertThat
import assertk.assertions.isFalse
import assertk.assertions.isTrue
import assertk.fail
import com.github.jengelman.gradle.plugins.shadow.testkit.util.testObjectFactory
import com.github.jengelman.gradle.plugins.shadow.util.testObjectFactory
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.github.jengelman.gradle.plugins.shadow.transformers
import assertk.assertThat
import assertk.assertions.isFalse
import assertk.assertions.isTrue
import com.github.jengelman.gradle.plugins.shadow.testkit.util.testObjectFactory
import com.github.jengelman.gradle.plugins.shadow.util.testObjectFactory
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import assertk.assertions.isFalse
import assertk.assertions.isGreaterThan
import assertk.assertions.isNotEmpty
import assertk.assertions.isTrue
import com.github.jengelman.gradle.plugins.shadow.testkit.util.testObjectFactory
import com.github.jengelman.gradle.plugins.shadow.util.testObjectFactory
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import assertk.assertions.isEqualTo
import assertk.assertions.isFalse
import assertk.assertions.isNotEmpty
import assertk.assertions.isTrue
import com.github.jengelman.gradle.plugins.shadow.testkit.util.testObjectFactory
import com.github.jengelman.gradle.plugins.shadow.util.testObjectFactory
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.github.jengelman.gradle.plugins.shadow.transformers
import assertk.assertThat
import assertk.assertions.isFalse
import assertk.assertions.isTrue
import com.github.jengelman.gradle.plugins.shadow.testkit.util.testObjectFactory
import com.github.jengelman.gradle.plugins.shadow.util.testObjectFactory
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@file:JvmName("Utils")

package com.github.jengelman.gradle.plugins.shadow.testkit.util
package com.github.jengelman.gradle.plugins.shadow.util

import org.gradle.api.model.ObjectFactory
import org.gradle.testfixtures.ProjectBuilder
Expand Down

0 comments on commit e90a0e5

Please sign in to comment.