<commit_before>/*
 * Copyright 2014 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.gradle.play

import org.gradle.integtests.fixtures.AbstractIntegrationSpec
import org.gradle.integtests.fixtures.Sample
import org.junit.Rule

class PlaySampleIntegrationTest extends AbstractIntegrationSpec {
    @Rule
    Sample playSample = new Sample(temporaryFolder, "play")

    def setup(){
        buildFile << """
        tasks.withType(ScalaCompile) {
            scalaCompileOptions.fork = true
            scalaCompileOptions.useAnt = false
            scalaCompileOptions.forkOptions.memoryMaximumSize = '1g'
            scalaCompileOptions.forkOptions.jvmArgs = ['-XX:MaxPermSize=512m']
        }

        tasks.withType(TwirlCompile){
            fork = true
            forkOptions.memoryMaximumSize =  "256m"
        }"""
    }

    def "can build play sample"() {
        given:
        sample playSample
        expect:
        succeeds "assemble"
    }
}<commit_msg>tweak play sample integtest to tweak the correct build.gradle file for using forked compiler<commit_after>/*
 * Copyright 2014 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.gradle.play
import org.gradle.integtests.fixtures.AbstractIntegrationSpec
import org.gradle.integtests.fixtures.Sample
import org.junit.Rule

class PlaySampleIntegrationTest extends AbstractIntegrationSpec {
    @Rule
    Sample playSample = new Sample(temporaryFolder, "play")

    def "can build play sample"() {
        given:
        sample playSample
        playSample.dir.file("build.gradle") << """
        tasks.withType(ScalaCompile) {
            scalaCompileOptions.fork = true
            scalaCompileOptions.useAnt = false
            scalaCompileOptions.forkOptions.memoryMaximumSize = '1g'
            scalaCompileOptions.forkOptions.jvmArgs = ['-XX:MaxPermSize=512m']
        }

        tasks.withType(TwirlCompile){
            fork = true
            forkOptions.memoryMaximumSize =  "256m"
        }"""
        expect:
        succeeds "assemble"
    }
}
{'fraction_non_alphanumeric': 0.07903123008285533, 'fraction_numerical': 0.009560229445506692, 'mean_word_length': 2.968394437420986, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1378875', 'n_tokens_mistral': 868, 'n_tokens_neox': 806, 'n_words': 275}