Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for emptyAcceptedApiChanges (0.08 sec)

  1. build-logic/binary-compatibility/src/test/groovy/gradlebuild/binarycompatibility/AcceptedApiChangesJsonFileManagerTest.groovy

            when:
            jsonFileManager.emptyAcceptedApiChanges(jsonFile)
    
            then:
            jsonFile.text == nonExistentAcceptedApiChanges()
        }
    
        def "can clean non-existing API changes"() {
            given:
            jsonFile << nonExistentAcceptedApiChanges()
    
            when:
            jsonFileManager.emptyAcceptedApiChanges(jsonFile)
    
            then:
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Aug 17 08:32:56 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  2. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/CleanAcceptedApiChanges.groovy

            def jsonFileManager = new AcceptedApiChangesJsonFileManager()
            jsonFileDirectory.asFile.get().listFiles()
                ?.findAll { it.name.endsWith(".json") }
                ?.each { jsonFileManager.emptyAcceptedApiChanges(it) }
        }
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Jun 05 08:27:29 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/AcceptedApiChangesJsonFileManager.groovy

     */
    
    package gradlebuild.binarycompatibility
    
    import com.google.gson.Gson
    import com.google.gson.stream.JsonWriter
    
    class AcceptedApiChangesJsonFileManager {
    
        void emptyAcceptedApiChanges(File jsonFile) {
            jsonFile.withWriter { fileWriter ->
                def writer = new JsonWriter(fileWriter)
                writer.setIndent("    ")
                new Gson().toJson([acceptedApiChanges: []], Object, writer)
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 1K bytes
    - Viewed (0)
Back to top