Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 347 for sourceSets (0.14 sec)

  1. platforms/jvm/plugins-groovy/src/test/groovy/org/gradle/api/plugins/GroovyBasePluginTest.groovy

        }
    
        @Test void appliesMappingsToNewSourceSet() {
            def sourceSet = project.sourceSets.create('custom')
            assertThat(sourceSet.groovy.displayName, equalTo("custom Groovy source"))
            assertThat(sourceSet.groovy.srcDirs, equalTo(toLinkedSet(project.file("src/custom/groovy"))))
        }
    
        @Test void addsCompileTaskToNewSourceSet() {
            project.sourceSets.create('custom')
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 12 18:44:49 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. platforms/documentation/docs/src/snippets/configurationCache/disallowedTypesFixed/groovy/build.gradle

            def classpathFiles = classpath.files
            // ...
        }
    }
    // end::task-type[]
    
    tasks.register("someTaskType", SomeTask) {
        classpath.from(sourceSets.main.compileClasspath)
    }
    
    // tag::ad-hoc-task[]
    tasks.register('someTask') {
        def classpath = sourceSets.main.compileClasspath // <1>
        doLast {
            def classpathFiles = classpath.files
        }
    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 607 bytes
    - Viewed (0)
  3. platforms/documentation/docs/src/snippets/tutorial/compileTaskClasspath/groovy/build.gradle

        // Groovy only needs the declared dependencies
        // (and not longer the output of compileJava)
        classpath = sourceSets.main.compileClasspath
    }
    tasks.named('compileJava') {
        // Java also depends on the result of Groovy compilation
        // (which automatically makes it depend of compileGroovy)
        classpath += files(sourceSets.main.groovy.classesDirectory)
    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 547 bytes
    - Viewed (0)
  4. platforms/documentation/docs/src/snippets/java/customDirs/kotlin/build.gradle.kts

    dependencies {
        testImplementation("junit:junit:4.13")
    }
    
    // tag::custom-src-dirs[]
    sourceSets {
        main {
            java {
                setSrcDirs(listOf("src"))
            }
        }
    
        test {
            java {
                setSrcDirs(listOf("test"))
            }
        }
    }
    // end::custom-src-dirs[]
    
    // tag::custom-extra-src-dir[]
    sourceSets {
        main {
            java {
                srcDir("thirdParty/src/main/java")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  5. platforms/jvm/plugins-java-base/src/integTest/groovy/org/gradle/api/plugins/JavaBasePluginIntegrationTest.groovy

            given:
            buildFile << """
                plugins {
                    id("java-base")
                }
    
                sourceSets {
                    sources
                }
    
                task verify {
                    assert sourceSets.sources.output.classesDirs instanceof ConfigurableFileCollection
                }
            """
    
            expect:
            succeeds "verify"
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 12:15:28 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  6. platforms/jvm/language-groovy/src/testFixtures/resources/org/gradle/groovy/compile/AbstractApiGroovyCompilerIntegrationSpec/canEnableAndDisableIntegerOptimization/build.gradle

        mavenCentral()
    }
    
    task compileWithOptimization(type: GroovyCompile) {
        source = sourceSets.main.groovy
        classpath = configurations.compileClasspath
        destinationDirectory = file("$buildDir/classes/optimized")
        groovyOptions.optimizationOptions["int"] = true
    }
    
    task compileWithoutOptimization(type: GroovyCompile) {
        source = sourceSets.main.groovy
        classpath = configurations.compileClasspath
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Aug 28 11:40:18 UTC 2023
    - 928 bytes
    - Viewed (0)
  7. platforms/documentation/docs/src/snippets/java/customDirs/groovy/build.gradle

    dependencies {
        testImplementation 'junit:junit:4.13'
    }
    
    // tag::custom-src-dirs[]
    sourceSets {
        main {
             java {
                srcDirs = ['src']
             }
        }
    
        test {
            java {
                srcDirs = ['test']
            }
        }
    }
    // end::custom-src-dirs[]
    
    // tag::custom-extra-src-dir[]
    sourceSets {
        main {
            java {
                srcDir 'thirdParty/src/main/java'
            }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. platforms/jvm/language-groovy/src/integTest/resources/org/gradle/groovy/compile/InvokeDynamicGroovyCompilerSpec/canEnableAndDisableInvokeDynamicOptimization/build.gradle

        mavenCentral()
    }
    
    task compileWithOptimization(type: GroovyCompile) {
        source = sourceSets.main.groovy
        classpath = configurations.compileClasspath
        destinationDirectory = file("$buildDir/classes/optimized")
        groovyOptions.optimizationOptions.indy = true
    }
    
    task compileWithoutOptimization(type: GroovyCompile) {
        source = sourceSets.main.groovy
        classpath = configurations.compileClasspath
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 12 18:44:49 UTC 2023
    - 1K bytes
    - Viewed (0)
  9. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/ArtifactVariantReselectionIntegrationTest.groovy

                }
    
                java {
                    sourceSets {
                        withoutSources
                    }
                    registerFeature("withoutSources") {
                        usingSourceSet(sourceSets.withoutSources)
                    }
                }
    
                java {
                    sourceSets {
                        withSources
                    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 18 19:46:19 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  10. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/capabilities/CapabilitiesConflictResolutionIssuesIntegrationTest.groovy

                plugins {
                    id 'java'
                }
    
                sourceSets {
                    one {}
                    onePref {}
                    two {}
                    twoPref {}
                }
    
                java {
                    registerFeature('one') {
                        usingSourceSet(sourceSets.one)
                        capability('o', 'n', 'e')
                        capability('g', 'one', 'v')
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 6.2K bytes
    - Viewed (0)
Back to top