<commit_before>/*
 * Copyright 2011-2015 Asakusa Framework Team.
 *
 * 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 com.asakusafw.gradle.plugins

import org.gradle.api.*

import com.asakusafw.gradle.plugins.internal.AsakusafwInternalPluginConvention

/**
 * Base class of Asakusa Framework Gradle Plugin.
 */
class AsakusafwBasePlugin implements Plugin<Project> {

    private Project project

    void apply(Project project) {
        this.project = project
        configureProject()
    }

    private void configureProject() {
        configureExtentionProperties()
        configureRepositories()
    }

    private void configureExtentionProperties() {
        project.extensions.create('asakusafwInternal', AsakusafwInternalPluginConvention)
    }

    private void configureRepositories() {
        project.repositories {
            maven { url "http://repo1.maven.org/maven2/" }
            maven { url "http://asakusafw.s3.amazonaws.com/maven/releases" }
            maven { url "http://asakusafw.s3.amazonaws.com/maven/snapshots" }
        }
    }
}

<commit_msg>Raise warning messages for using Gradle 1.x.<commit_after>/*
 * Copyright 2011-2015 Asakusa Framework Team.
 *
 * 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 com.asakusafw.gradle.plugins

import org.gradle.api.*
import org.gradle.util.GradleVersion

import com.asakusafw.gradle.plugins.internal.AsakusafwInternalPluginConvention

/**
 * Base class of Asakusa Framework Gradle Plugin.
 */
class AsakusafwBasePlugin implements Plugin<Project> {

    private Project project

    void apply(Project project) {
        this.project = project
        if (GradleVersion.current() < GradleVersion.version('2.0')) {
            project.logger.warn "Asakusa Framework Gradle plug-ins recommend using Gradle 2.0 or later"
            project.logger.warn "The current Gradle version (${GradleVersion.current()}) will not be supported in future releases"
        }
        configureProject()
    }

    private void configureProject() {
        configureExtentionProperties()
        configureRepositories()
    }

    private void configureExtentionProperties() {
        project.extensions.create('asakusafwInternal', AsakusafwInternalPluginConvention)
    }

    private void configureRepositories() {
        project.repositories {
            maven { url "http://repo1.maven.org/maven2/" }
            maven { url "http://asakusafw.s3.amazonaws.com/maven/releases" }
            maven { url "http://asakusafw.s3.amazonaws.com/maven/snapshots" }
        }
    }
}


{'fraction_non_alphanumeric': 0.08765051806216746, 'fraction_numerical': 0.010361243349201904, 'mean_word_length': 3.1826697892271665, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, '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': '3757177', 'n_tokens_mistral': 1020, 'n_tokens_neox': 958, 'n_words': 301}