<commit_before>import org.gradle.api.publish.maven.MavenPublication

buildscript {
    repositories {
        mavenCentral()
        jcenter()
        maven {
            setUrl("https://plugins.gradle.org/m2/")
        }
    }
    dependencies {
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.1")
        classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3")
    }
}

allprojects {
    apply {
        plugin("com.jfrog.bintray")
    }
    version = "0.0.1"
    group = "org.jlleitschuh.guice"
    bintray {
        user = properties["bintray.publish.user"].toString()
        key = properties["bintray.publish.key"].toString()
        with(pkg) {
            repo = "maven-artifacts"
            name = "kotlin-guiced"
            setLicenses("MIT")
            setLabels("guice", "kotlin", "dependency injection")
            vcsUrl = "https://github.com/JLLeitschuh/kotlin-guiced"
            githubRepo = "https://github.com/JLLeitschuh/kotlin-guiced"
        }
    }
}

subprojects {
    apply {
        plugin("kotlin")
        plugin("maven-publish")
    }

    repositories {
        mavenCentral()
    }

    dependencies {
        compile(kotlinModule("stdlib"))
        compile(kotlinModule("reflect"))
        testCompile(group = "io.kotlintest", name = "kotlintest", version = "2.0.2")
    }

    afterEvaluate {
        // This ensures that the entire project's configuration has been resolved before creating a publish artifact.
        publishing {
            publications {
                create<MavenPublication>(name) {
                    from(components["java"])
                }
            }
        }
    }
}

/**
 * Retrieves or configures the [bintray][com.jfrog.bintray.gradle.BintrayExtension] project extension.
 */
fun Project.`bintray`(configure: com.jfrog.bintray.gradle.BintrayExtension.() -> Unit = {}) =
    extensions.getByName<com.jfrog.bintray.gradle.BintrayExtension>("bintray").apply { configure() }

/**
 * Retrieves or configures the [publishing][org.gradle.api.publish.PublishingExtension] project extension.
 */
fun Project.`publishing`(configure: org.gradle.api.publish.PublishingExtension.() -> Unit = {}) =
    extensions.getByName<org.gradle.api.publish.PublishingExtension>("publishing").apply { configure() }<commit_msg>Publish v0.0.2 with correct pom to jfrog<commit_after>import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.tasks.bundling.Jar

buildscript {
    repositories {
        mavenCentral()
        jcenter()
        maven {
            setUrl("https://plugins.gradle.org/m2/")
        }
    }
    dependencies {
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.1")
        classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3")
    }
}
apply {
    plugin("com.jfrog.bintray")
    plugin("maven-publish")
}
val PUBLISHED_CONFIGURATION_NAME = "published"

allprojects {
    version = "0.0.2"
    group = "org.jlleitschuh.guice"
}


subprojects {
    apply {
        plugin("com.jfrog.bintray")
        plugin("kotlin")
        plugin("maven-publish")
        plugin("java-library")
    }

    val publicationName = "publication-$name"
    bintray {
        user = properties["bintray.publish.user"].toString()
        key = properties["bintray.publish.key"].toString()
        setPublications(publicationName)
        with(pkg) {
            repo = "maven-artifacts"
            name = "kotlin-guiced"
            publish = true
            setLicenses("MIT")
            setLabels("guice", "kotlin", "dependency injection")
            vcsUrl = "https://github.com/JLLeitschuh/kotlin-guiced.git"
            githubRepo = "https://github.com/JLLeitschuh/kotlin-guiced"
        }
    }

    repositories {
        mavenCentral()
    }

    dependencies {
        compile(kotlinModule("stdlib"))
        compile(kotlinModule("reflect"))
        testCompile(group = "io.kotlintest", name = "kotlintest", version = "2.0.2")
    }

    val sourceJarTask = task<Jar>("sourceJar") {
        from(the<JavaPluginConvention>().sourceSets["main"].allSource)
        classifier = "sources"
    }

    afterEvaluate {
        // This ensures that the entire project's configuration has been resolved before creating a publish artifact.
        publishing {
            publications {
                create<MavenPublication>(publicationName) {
                    from(components["java"])
                    artifact(sourceJarTask)
                }
            }
        }
    }
}

configurations.create(PUBLISHED_CONFIGURATION_NAME)

/**
 * Retrieves or configures the [bintray][com.jfrog.bintray.gradle.BintrayExtension] project extension.
 */
fun Project.`bintray`(configure: com.jfrog.bintray.gradle.BintrayExtension.() -> Unit = {}) =
    extensions.getByName<com.jfrog.bintray.gradle.BintrayExtension>("bintray").apply { configure() }

/**
 * Retrieves or configures the [publishing][org.gradle.api.publish.PublishingExtension] project extension.
 */
fun Project.`publishing`(configure: org.gradle.api.publish.PublishingExtension.() -> Unit = {}) =
    extensions.getByName<org.gradle.api.publish.PublishingExtension>("publishing").apply { configure() }
{'fraction_non_alphanumeric': 0.13289676425269645, 'fraction_numerical': 0.005585516178736517, 'mean_word_length': 2.537465940054496, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 6, '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': '4977133', 'n_tokens_mistral': 1680, 'n_tokens_neox': 1591, 'n_words': 224}