Skip to content
Snippets Groups Projects
build.gradle 2.36 KiB
Newer Older
Benoit Marty's avatar
Benoit Marty committed
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    apply from: 'dependencies.gradle'
Benoit Marty's avatar
Benoit Marty committed
    apply from: 'dependencies_groups.gradle'
Benoit Marty's avatar
Benoit Marty committed
    repositories {
        google()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
        mavenCentral()
Benoit Marty's avatar
Benoit Marty committed
    }
    dependencies {
        classpath libs.gradle.gradlePlugin
        classpath libs.gradle.kotlinPlugin
        classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
Benoit Marty's avatar
Benoit Marty committed
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
Benoit Marty's avatar
Benoit Marty committed
        // For olm library.
        maven {
            url 'https://gitlab.matrix.org/api/v4/projects/27/packages/maven'
            content {
                groups.olm.regex.each { includeGroupByRegex it }
                groups.olm.group.each { includeGroup it }
            }
        }
Benoit Marty's avatar
Benoit Marty committed
        maven {
            url 'https://jitpack.io'
            content {
Benoit Marty's avatar
Benoit Marty committed
                groups.jitpack.regex.each { includeGroupByRegex it }
                groups.jitpack.group.each { includeGroup it }
            }
        }
        google {
            content {
                groups.google.regex.each { includeGroupByRegex it }
                groups.google.group.each { includeGroup it }
            }
        }
        mavenCentral {
            content {
                groups.mavenCentral.regex.each { includeGroupByRegex it }
                groups.mavenCentral.group.each { includeGroup it }
            }
        }
        //noinspection JcenterRepositoryObsolete
        jcenter {
            content {
                groups.jcenter.regex.each { includeGroupByRegex it }
                groups.jcenter.group.each { includeGroup it }
Benoit Marty's avatar
Benoit Marty committed
            }
        }
    }

    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
        // Warnings are potential errors, so stop ignoring them
        // Ignore on the SDK for the moment
        kotlinOptions.allWarningsAsErrors = false
    plugins.withId("com.vanniktech.maven.publish") {
        // Publish on s01.oss.sonatype.org
        //https://github.com/vanniktech/gradle-maven-publish-plugin#where-to-upload-to
        mavenPublish {
            sonatypeHost = "S01"
        }
    }
Benoit Marty's avatar
Benoit Marty committed
}

task clean(type: Delete) {
    delete rootProject.buildDir
}