Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 28 for withEnvironmentVars (0.58 sec)

  1. platforms/software/signing/src/integTest/groovy/org/gradle/plugins/signing/SigningSamplesSpec.groovy

        def "uses in-memory PGP keys with dsl #dsl"() {
            given:
            def projectDir = sample.dir.file(dsl)
            inDirectory(projectDir)
    
            when:
            executer.withEnvironmentVars([
                ORG_GRADLE_PROJECT_signingKey: secretKey,
                ORG_GRADLE_PROJECT_signingPassword: password
            ])
            succeeds("signStuffZip")
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  2. platforms/core-configuration/configuration-cache/src/integTest/groovy/org/gradle/internal/cc/impl/inputs/undeclared/EnvVariableInjection.groovy

                    return "using environment variable"
                }
    
                @Override
                void setup(AbstractConfigurationCacheIntegrationTest test) {
                    test.executer.withEnvironmentVars(variables)
                }
            }
        }
    
        static void checkEnvironmentVariableUnset(String key) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. testing/distributions-integ-tests/src/integTest/groovy/org/gradle/SrcDistributionIntegrationSpec.groovy

                withArgument("-D${PLUGIN_PORTAL_OVERRIDE_URL_PROPERTY}=${gradlePluginRepositoryMirrorUrl()}")
                withArgument("-Porg.gradle.java.installations.paths=${Jvm.current().javaHome.absolutePath}")
                withEnvironmentVars([BUILD_BRANCH: System.getProperty("gradleBuildBranch"), BUILD_COMMIT_ID: System.getProperty("gradleBuildCommitId")])
                withWarningMode(WarningMode.None)
                noDeprecationChecks()
            }.run()
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  4. testing/integ-test/src/integTest/groovy/org/gradle/integtests/environment/BuildEnvironmentIntegrationTest.groovy

            file('build.gradle') << "println providers.environmentVariable('foo').orNull"
    
            when:
            def out = executer.withEnvironmentVars(foo: "gradle rocks!").run().output
    
            then:
            out.contains("gradle rocks!")
    
            when:
            out = executer.withEnvironmentVars(foo: "and will be even better").run().output
    
            then:
            out.contains("and will be even better")
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. platforms/jvm/plugins-java/src/integTest/groovy/org/gradle/java/environment/JreJavaHomeJavaIntegrationTest.groovy

            }
            """
            def envVars = System.getenv().findAll { !(it.key in ['GRADLE_OPTS', 'JAVA_HOME', 'Path']) }
            envVars.put("Path", "C:\\Windows\\System32")
            when:
            executer.withEnvironmentVars(envVars).withTasks("compileJava").run()
            then:
            javaClassFile("org/test/JavaClazz.class").exists()
            where:
            forkMode << [true, false]
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 12:15:28 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  6. platforms/jvm/plugins-groovy/src/integTest/groovy/org/gradle/groovy/environment/JreJavaHomeGroovyIntegrationTest.groovy

                }
                """
            when:
            def envVars = System.getenv().findAll { !(it.key in ['GRADLE_OPTS', 'JAVA_HOME', 'Path']) }
            envVars.put("Path", "C:\\Windows\\System32")
            executer.withEnvironmentVars(envVars).withTasks("compileGroovy").run()
    
            then:
            groovyClassFile("org/test/JavaClazz.class").exists()
            groovyClassFile("org/test/GroovyClazz.class").exists()
    
            where:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 12 18:44:49 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  7. platforms/jvm/scala/src/integTest/groovy/org/gradle/scala/environment/JreJavaHomeScalaIntegrationTest.groovy

                        """
            def envVars = System.getenv().findAll { !(it.key in ['GRADLE_OPTS', 'JAVA_HOME', 'Path']) }
            envVars.put("Path", "C:\\Windows\\System32")
            when:
            executer.withEnvironmentVars(envVars).withTasks("compileScala").run()
            then:
            scalaClassFile("org/test/ScalaClazz.class").exists()
        }
    
        private writeScalaTestSource(String srcDir) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 15:43:33 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  8. testing/internal-integ-testing/src/main/groovy/org/gradle/test/fixtures/maven/M2Installation.groovy

            // if call `using m2`, then we disable the automatic isolation of m2
            isolateMavenLocal = false
            if (globalMavenDirectory?.exists()) {
                gradleExecuter.withEnvironmentVars(M2_HOME: globalMavenDirectory.absolutePath)
            }
        }
    
        void isolateMavenLocalRepo(GradleExecuter gradleExecuter) {
            gradleExecuter.beforeExecute {
                if (isolateMavenLocal) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. platforms/core-runtime/launcher/src/integTest/groovy/org/gradle/launcher/daemon/DaemonJvmSettingsIntegrationTest.groovy

                }
            """
    
            when:
            // This prevents the executer fixture from adding "default" values to the build jvm options
            executer.useOnlyRequestedJvmOpts()
            executer.withEnvironmentVars(JAVA_TOOL_OPTIONS: javaToolOptions)
            run "verify"
    
            then:
            String gradleVersion = (output =~ /GRADLE_VERSION: (.*)/)[0][1]
            daemons(gradleVersion).daemons.size() == 1
    
            where:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 06 13:00:39 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  10. platforms/documentation/docs/src/docsTest/java/org/gradle/docs/samples/IntegrationTestSamplesExecutor.java

                .map(it -> it.replace(SAMPLE_ENV_PREFIX, "").split("="))
                .filter(it -> it.length == 2)
                .collect(toMap(it -> it[0], it -> it[1]));
            if (!env.isEmpty()) {
                executer.withEnvironmentVars(env);
            }
            return executer;
        }
    
        private String getAvailableJdksFlag() {
            String allJdkPaths = AvailableJavaHomes.getAvailableJvms().stream()
                .map(Jvm::getJavaHome)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 6.6K bytes
    - Viewed (0)
Back to top