<commit_before>/*
 * Gretty
 *
 * Copyright (C) 2013-2014 <NAME> and contributors.
 *
 * See the file "LICENSE" for copying and usage permission.
 * See the file "CONTRIBUTORS" for complete list of contributors.
 */
package org.akhikhl.gretty
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import groovy.util.XmlSlurper
import org.slf4j.Logger
import org.slf4j.LoggerFactory
/**
 *
 * @author akhikhl
 */
class GrettyPlugin implements Plugin<Project> {

  protected static final Logger log = LoggerFactory.getLogger(GrettyPlugin)

  private void addConfigurations(Project project) {
    def runtimeConfig = project.configurations.findByName('runtime')
    project.configurations {
      gretty
      grettyStarter
      springBoot {
        if(runtimeConfig)
          extendsFrom runtimeConfig
        exclude module: 'spring-boot-starter-tomcat'
        exclude group: 'org.eclipse.jetty'
      }
      grettyNoSpringBoot {
        extendsFrom project.configurations.gretty
        exclude group: 'org.springframework.boot'
      }
      grettyRunnerSpringBootBase
      grettyRunnerSpringBoot {
        extendsFrom project.configurations.grettyRunnerSpringBootBase
      }
      grettyRunnerSpringBootJettyBase {
        extendsFrom project.configurations.grettyRunnerSpringBoot
      }
      grettyRunnerSpringBootJetty {
        extendsFrom project.configurations.grettyRunnerSpringBootJettyBase
      }
      grettyRunnerSpringBootTomcatBase {
        extendsFrom project.configurations.grettyRunnerSpringBoot
      }
      grettyRunnerSpringBootTomcat {
        extendsFrom project.configurations.grettyRunnerSpringBootTomcatBase
      }
      grettySpringLoaded {
        transitive = false
      }
      productRuntime {
        if(runtimeConfig)
          extendsFrom runtimeConfig
        exclude group: 'org.springframework.boot'
        // We exclude groovy from product, because it is already included in runner configuration
        // (see gretty-runner dependencies). Thus we avoid groovy version conflicts.
        exclude module: 'groovy-all'
      }
    }

    if(!project.configurations.findByName('providedCompile'))
      project.configurations {
        providedCompile
        project.configurations.findByName('compile')?.extendsFrom providedCompile
      }<commit_msg>fixed bug: impossible to use spring-boot-starter-jdbc in Gretty products, because Gretty excludes all spring-boot artifacts from webapp libs<commit_after>/*
 * Gretty
 *
 * Copyright (C) 2013-2014 <NAME> and contributors.
 *
 * See the file "LICENSE" for copying and usage permission.
 * See the file "CONTRIBUTORS" for complete list of contributors.
 */
package org.akhikhl.gretty
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import groovy.util.XmlSlurper
import org.slf4j.Logger
import org.slf4j.LoggerFactory
/**
 *
 * @author akhikhl
 */
class GrettyPlugin implements Plugin<Project> {

  protected static final Logger log = LoggerFactory.getLogger(GrettyPlugin)

  private void addConfigurations(Project project) {
    def runtimeConfig = project.configurations.findByName('runtime')
    project.configurations {
      gretty
      grettyStarter
      springBoot {
        if(runtimeConfig)
          extendsFrom runtimeConfig
        exclude module: 'spring-boot-starter-tomcat'
        exclude group: 'org.eclipse.jetty'
      }
      grettyNoSpringBoot {
        extendsFrom project.configurations.gretty
        exclude group: 'org.springframework.boot', module: 'spring-boot'
        exclude group: 'org.springframework.boot', module: 'spring-boot-autoconfigure'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-jetty'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-web'
      }
      grettyRunnerSpringBootBase
      grettyRunnerSpringBoot {
        extendsFrom project.configurations.grettyRunnerSpringBootBase
      }
      grettyRunnerSpringBootJettyBase {
        extendsFrom project.configurations.grettyRunnerSpringBoot
      }
      grettyRunnerSpringBootJetty {
        extendsFrom project.configurations.grettyRunnerSpringBootJettyBase
      }
      grettyRunnerSpringBootTomcatBase {
        extendsFrom project.configurations.grettyRunnerSpringBoot
      }
      grettyRunnerSpringBootTomcat {
        extendsFrom project.configurations.grettyRunnerSpringBootTomcatBase
      }
      grettySpringLoaded {
        transitive = false
      }
      productRuntime {
        if(runtimeConfig)
          extendsFrom runtimeConfig
        exclude group: 'org.springframework.boot', module: 'spring-boot'
        exclude group: 'org.springframework.boot', module: 'spring-boot-autoconfigure'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-jetty'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-web'
        // We exclude groovy from product, because it is already included in runner configuration
        // (see gretty-runner dependencies). Thus we avoid groovy version conflicts.
        exclude module: 'groovy-all'
      }
    }

    if(!project.configurations.findByName('providedCompile'))
      project.configurations {
        providedCompile
        project.configurations.findByName('compile')?.extendsFrom providedCompile
      }
{'fraction_non_alphanumeric': 0.08071900966593183, 'fraction_numerical': 0.003391555027980329, 'mean_word_length': 3.2615606936416186, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2561219', 'n_tokens_mistral': 1598, 'n_tokens_neox': 1592, 'n_words': 349}