Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for withDefaultCharacterEncoding (0.34 sec)

  1. platforms/jvm/language-jvm/src/integTest/groovy/org/gradle/api/tasks/bundling/JarEncodingIntegrationTest.groovy

                // Use an UTF-8 caution symbol in file name
                // that will create a mojibake if encoded using another charset
                file 'mojibake☡.txt'
            }
    
            when:
            executer.withDefaultCharacterEncoding('windows-1252').withTasks("jar")
            executer.run()
    
            then:
            def jar = new JarTestFixture(file('dest/test.jar'))
            jar.assertContainsFile('mojibake☡.txt')
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 12:15:28 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  2. subprojects/core/src/integTest/groovy/org/gradle/api/tasks/CopySpecEncodingIntegrationSpec.groovy

                task (copy, type: Copy) {
                    from 'files'
                    into 'dest'
                    expand(one: 1)
                }
            """.stripIndent()
            executer.beforeExecute { it.withDefaultCharacterEncoding('ISO-8859-1') }
    
            when:
            run 'copy'
    
            then:
            file('dest/accents.c').getText('ISO-8859-1') == 'éàüî 1'
    
            when:
            run 'copy'
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jun 21 12:45:30 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. subprojects/core/src/integTest/groovy/org/gradle/api/HttpScriptPluginInEncodingtegrationSpec.groovy

    class HttpScriptPluginInEncodingtegrationSpec extends AbstractHttpScriptPluginIntegrationSpec {
    
        def "uses encoding specified by http server"() {
            given:
            executer.withDefaultCharacterEncoding("UTF-8")
    
            and:
            def scriptFile = file("script-encoding.gradle")
            scriptFile.setText("""
    task check {
        doLast {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jun 21 12:45:30 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  4. testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/GradleContextualExecuter.java

        // This should be improved as part of https://github.com/gradle/gradle-private/issues/1009
    
        @Override
        public GradleExecuter withDefaultCharacterEncoding(String defaultCharacterEncoding) {
            if (executerType == Executer.embedded && !Charset.forName(defaultCharacterEncoding).equals(Charset.defaultCharset())) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 18:06:31 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  5. subprojects/core/src/integTest/groovy/org/gradle/api/BuildScriptExecutionIntegrationSpec.groovy

    class BuildScriptExecutionIntegrationSpec extends AbstractIntegrationSpec {
    
        def "build scripts must be encoded using utf-8"() {
            given:
            executer.withDefaultCharacterEncoding("ISO-8859-15")
    
            and:
            buildFile.setText("""
    task check {
        doLast {
            assert java.nio.charset.Charset.defaultCharset().name() == "ISO-8859-15"
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jun 21 12:26:59 UTC 2023
    - 2K bytes
    - Viewed (0)
  6. subprojects/core/src/integTest/groovy/org/gradle/api/tasks/CopyTaskEncodingIntegrationSpec.groovy

                            into 'build/resources'
                        }
                    }
                }
            """
    
            file("res", nonAsciiFileName) << "foo"
    
            when:
            executer.withDefaultCharacterEncoding("ISO-8859-1").withTasks("copyFiles")
            executer.run()
    
            then:
            file("build/resources", nonAsciiFileName).exists()
        }
    
        @Issue("https://issues.gradle.org/browse/GRADLE-2181")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 03 15:21:23 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  7. platforms/core-runtime/launcher/src/integTest/groovy/org/gradle/launcher/daemon/AbstractDaemonLifecycleSpec.groovy

                )
                if (javaHome) {
                    executer.withJavaHome(javaHome)
                }
                if (buildEncoding) {
                    executer.withDefaultCharacterEncoding(buildEncoding)
                }
                executer.usingProjectDirectory buildDirWithScript(builds.size(), """
                    def stopFile = file("stop")
                    def existsFile = file("exists")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 13:32:55 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  8. platforms/core-runtime/launcher/src/integTest/groovy/org/gradle/launcher/BuildEnvironmentIntegrationTest.groovy

            [new Locale('de'), new Locale('en')].find { it != Locale.default }
        }
    
        def executerEncoding(String inputEncoding) {
            if (inputEncoding) {
                executer.withDefaultCharacterEncoding(inputEncoding)
            }
        }
    
        @Unroll("build default encoding matches specified - input = #inputEncoding, expectedEncoding: #expectedEncoding")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  9. testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/GradleExecuter.java

        /**
         * Sets the default character encoding to use.
         *
         * Only makes sense for forking executers.
         *
         * @return this executer
         */
        GradleExecuter withDefaultCharacterEncoding(String defaultCharacterEncoding);
    
        /**
         * Sets the default locale to use.
         *
         * Only makes sense for forking executers.
         *
         * @return this executer
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  10. testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/AbstractGradleExecuter.java

            }
    
            if (stdinPipe != null) {
                executer.withStdinPipe(stdinPipe);
            }
    
            if (defaultCharacterEncoding != null) {
                executer.withDefaultCharacterEncoding(defaultCharacterEncoding);
            }
            if (noExplicitNativeServicesDir) {
                executer.withNoExplicitNativeServicesDir();
            }
            if (fullDeprecationStackTrace) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 11 09:51:15 UTC 2024
    - 55.1K bytes
    - Viewed (0)
Back to top