Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for AbstractAcceptedApiChangesMaintenanceTaskIntegrationTest (0.34 sec)

  1. build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/AbstractAcceptedApiChangesMaintenanceTaskIntegrationTest.kt

    import org.junit.jupiter.api.Assertions
    import org.junit.jupiter.api.BeforeEach
    import org.junit.jupiter.api.io.TempDir
    import java.io.File
    import java.io.StringWriter
    
    
    abstract class AbstractAcceptedApiChangesMaintenanceTaskIntegrationTest {
        @TempDir
        lateinit var projectDir: File
        lateinit var acceptedApiChangesFile: File
    
        @BeforeEach
        fun setUp() {
            projectDir.resolve("src").resolve("changes").mkdirs()
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Mon Nov 28 21:09:42 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  2. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/AbstractAcceptedApiChangesMaintenanceTask.kt

    import org.gradle.api.tasks.PathSensitivity
    
    
    /**
     * Abstract base class for [Task][org.gradle.api.Task]s that verify and manipulate the given accepted API changes file.
     */
    @CacheableTask
    abstract class AbstractAcceptedApiChangesMaintenanceTask : DefaultTask() {
        @get:InputFile
        @get:PathSensitive(PathSensitivity.NONE)
        abstract val apiChangesFile: RegularFileProperty
    
        protected
        fun loadChanges(): List<AcceptedApiChange> {
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Tue Feb 07 20:38:43 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  3. build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/SortAcceptedApiChangesTaskIntegrationTest.kt

    import com.google.gson.Gson
    import org.gradle.testkit.runner.TaskOutcome
    import org.junit.jupiter.api.Assertions
    import org.junit.jupiter.api.Test
    
    
    class SortAcceptedApiChangesTaskIntegrationTest : AbstractAcceptedApiChangesMaintenanceTaskIntegrationTest() {
        @Test
        fun `verify misordered changes can be sorted`() {
            //language=JSON
            acceptedApiChangesFile.writeText(
                """
                    {
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Fri Sep 30 18:18:04 GMT 2022
    - 7.5K bytes
    - Viewed (0)
  4. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/SortAcceptedApiChangesTask.kt

     * so that they are alphabetically sorted (by type, then member).
     */
    @CacheableTask
    abstract class SortAcceptedApiChangesTask : AbstractAcceptedApiChangesMaintenanceTask() {
    
        @TaskAction
        fun execute() {
            val sortedChanges = sortChanges(loadChanges())
            val json = formatChanges(sortedChanges)
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Fri Sep 30 18:18:04 GMT 2022
    - 2.1K bytes
    - Viewed (0)
  5. build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/AlphabeticalAcceptedApiChangesTaskIntegrationTest.kt

     * limitations under the License.
     */
    
    package gradlebuild.binarycompatibility
    
    import org.junit.jupiter.api.Test
    
    
    class AlphabeticalAcceptedApiChangesTaskIntegrationTest : AbstractAcceptedApiChangesMaintenanceTaskIntegrationTest() {
        @Test
        fun `verify AlphabeticalAcceptedApiChangesTask detects misordered changes`() {
            //language=JSON
            acceptedApiChangesFile.writeText(
                """
                    {
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Fri Sep 30 18:18:04 GMT 2022
    - 6K bytes
    - Viewed (0)
  6. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/AlphabeticalAcceptedApiChangesTask.kt

     * are present in alphabetical order (by type, then member), and throws an exception and reports
     * any changes that are not.
     */
    @CacheableTask
    abstract class AlphabeticalAcceptedApiChangesTask : AbstractAcceptedApiChangesMaintenanceTask() {
        @TaskAction
        fun execute() {
            val originalChanges = loadChanges()
            val sortedChanges = sortChanges(originalChanges)
    
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Fri Sep 30 18:18:04 GMT 2022
    - 2K bytes
    - Viewed (0)
  7. build-logic/binary-compatibility/src/main/groovy/gradlebuild/EnrichedReportRenderer.groovy

                        // requires 1 or -1 specifically and ignores higher or lower values.  This sort ought to remain consistent
                        // with the sort used by AbstractAcceptedApiChangesMaintenanceTask.
                        result.acceptedApiChanges.sort((a, b) => { 
                            if ((a.type +'#' + a.member) > (b.type + '#' + b.member)) {
                                return 1; 
    Groovy
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Tue Feb 07 20:38:43 GMT 2023
    - 7.2K bytes
    - Viewed (0)
Back to top