Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 7adcb777 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Move publishing code to included file

parent 7aa18fa5
Loading
Loading
Loading
Loading
+3 −56
Original line number Diff line number Diff line
@@ -23,60 +23,7 @@ android {
    }
}

apply from: "../gradle/androidJars.gradle"
apply from: '../gradle/androidJars.gradle'
apply from: '../gradle/publish.gradle'

afterEvaluate {
    publishing {
        publications {
            release(MavenPublication) {
                pom {
                    name = 'UnifiedNlp API'
description = 'API interfaces and helpers to create backends for UnifiedNlp'
                    url = 'https://github.com/microg/UnifiedNlp'
                    licenses {
                        license {
                            name = 'The Apache Software License, Version 2.0'
                            url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                        }
                    }
                    developers {
                        developer {
                            id = 'microg'
                            name = 'microG Team'
                        }
                        developer {
                            id = 'mar-v-in'
                            name = 'Marvin W.'
                        }
                    }
                    scm {
                        url = 'https://github.com/microg/UnifiedNlp'
                        connection = 'scm:git:https://github.com/microg/UnifiedNlp.git'
                        developerConnection = 'scm:git:ssh://github.com/microg/UnifiedNlp.git'
                    }
                }

                from components.release
                artifact androidSourcesJar
                artifact androidJavadocsJar
            }
        }
        if (project.hasProperty('sonatype.username')) {
            repositories {
                maven {
                    name = 'sonatype'
                    url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
                    credentials {
                        username project.getProperty('sonatype.username')
                        password project.getProperty('sonatype.password')
                    }
                }
            }
        }
    }
    if (project.hasProperty('signing.keyId')) {
        signing {
            sign publishing.publications
        }
    }
}
+4 −58
Original line number Diff line number Diff line
@@ -29,66 +29,12 @@ android {
    }
}

apply from: "../gradle/androidJars.gradle"
apply from: '../gradle/androidJars.gradle'
apply from: '../gradle/publish.gradle'

description = 'UnifiedNlp client library'

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion"
}

afterEvaluate {
    publishing {
        publications {
            release(MavenPublication) {
                pom {
                    name = 'UnifiedNlp Client'
                    description = 'UnifiedNlp client library'
                    url = 'https://github.com/microg/UnifiedNlp'
                    licenses {
                        license {
                            name = 'The Apache Software License, Version 2.0'
                            url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                        }
                    }
                    developers {
                        developer {
                            id = 'microg'
                            name = 'microG Team'
                        }
                        developer {
                            id = 'mar-v-in'
                            name = 'Marvin W.'
                        }
                    }
                    scm {
                        url = 'https://github.com/microg/UnifiedNlp'
                        connection = 'scm:git:https://github.com/microg/UnifiedNlp.git'
                        developerConnection = 'scm:git:ssh://github.com/microg/UnifiedNlp.git'
                    }
                }

                from components.release
                artifact androidSourcesJar
                artifact androidJavadocsJar
            }
        }
        if (project.hasProperty('sonatype.username')) {
            repositories {
                maven {
                    name = 'sonatype'
                    url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
                    credentials {
                        username project.getProperty('sonatype.username')
                        password project.getProperty('sonatype.password')
                    }
                }
            }
        }
    }
    if (project.hasProperty('signing.keyId')) {
        signing {
            sign publishing.publications
        }
    }

}
+4 −57
Original line number Diff line number Diff line
@@ -23,65 +23,12 @@ android {
    }
}

apply from: "../gradle/androidJars.gradle"
apply from: '../gradle/androidJars.gradle'
apply from: '../gradle/publish.gradle'

description = 'UnifiedNlp service to implement Geocode API v1'

dependencies {
    implementation project(':client')
    compileOnly project(':compat')
}

afterEvaluate {
    publishing {
        publications {
            release(MavenPublication) {
                pom {
                    name = 'UnifiedNlp Geocode v1'
                    description = 'UnifiedNlp service to implement Geocode API v1'
                    url = 'https://github.com/microg/UnifiedNlp'
                    licenses {
                        license {
                            name = 'The Apache Software License, Version 2.0'
                            url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                        }
                    }
                    developers {
                        developer {
                            id = 'microg'
                            name = 'microG Team'
                        }
                        developer {
                            id = 'mar-v-in'
                            name = 'Marvin W.'
                        }
                    }
                    scm {
                        url = 'https://github.com/microg/UnifiedNlp'
                        connection = 'scm:git:https://github.com/microg/UnifiedNlp.git'
                        developerConnection = 'scm:git:ssh://github.com/microg/UnifiedNlp.git'
                    }
                }

                from components.release
                artifact androidSourcesJar
                artifact androidJavadocsJar
            }
        }
        if (project.hasProperty('sonatype.username')) {
            repositories {
                maven {
                    name = 'sonatype'
                    url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
                    credentials {
                        username project.getProperty('sonatype.username')
                        password project.getProperty('sonatype.password')
                    }
                }
            }
        }
    }
    if (project.hasProperty('signing.keyId')) {
        signing {
            sign publishing.publications
        }
    }
}

gradle/publish.gradle

0 → 100644
+59 −0
Original line number Diff line number Diff line
/*
 * SPDX-FileCopyrightText: 2020, microG Project Team
 * SPDX-License-Identifier: Apache-2.0
 */

afterEvaluate {
    publishing {
        publications {
            release(MavenPublication) {
                pom {
                    name = project.name
                    url = 'https://github.com/microg/UnifiedNlp'
                    licenses {
                        license {
                            name = 'The Apache Software License, Version 2.0'
                            url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                        }
                    }
                    developers {
                        developer {
                            id = 'microg'
                            name = 'microG Team'
                        }
                        developer {
                            id = 'mar-v-in'
                            name = 'Marvin W.'
                        }
                    }
                    scm {
                        url = 'https://github.com/microg/UnifiedNlp'
                        connection = 'scm:git:https://github.com/microg/UnifiedNlp.git'
                        developerConnection = 'scm:git:ssh://github.com/microg/UnifiedNlp.git'
                    }
                }

                from components.release
                artifact androidSourcesJar
                artifact androidJavadocsJar
            }
        }
        if (project.hasProperty('sonatype.username')) {
            repositories {
                maven {
                    name = 'sonatype'
                    url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
                    credentials {
                        username project.getProperty('sonatype.username')
                        password project.getProperty('sonatype.password')
                    }
                }
            }
        }
    }
    if (project.hasProperty('signing.keyId')) {
        signing {
            sign publishing.publications
        }
    }
}
+4 −57
Original line number Diff line number Diff line
@@ -23,65 +23,12 @@ android {
    }
}

apply from: "../gradle/androidJars.gradle"
apply from: '../gradle/androidJars.gradle'
apply from: '../gradle/publish.gradle'

description = 'UnifiedNlp service to implement Location API v2'

dependencies {
    implementation project(':client')
    compileOnly project(':compat')
}

afterEvaluate {
    publishing {
        publications {
            release(MavenPublication) {
                pom {
                    name = 'UnifiedNlp Location v2'
                    description = 'UnifiedNlp service to implement Location API v2'
                    url = 'https://github.com/microg/UnifiedNlp'
                    licenses {
                        license {
                            name = 'The Apache Software License, Version 2.0'
                            url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                        }
                    }
                    developers {
                        developer {
                            id = 'microg'
                            name = 'microG Team'
                        }
                        developer {
                            id = 'mar-v-in'
                            name = 'Marvin W.'
                        }
                    }
                    scm {
                        url = 'https://github.com/microg/UnifiedNlp'
                        connection = 'scm:git:https://github.com/microg/UnifiedNlp.git'
                        developerConnection = 'scm:git:ssh://github.com/microg/UnifiedNlp.git'
                    }
                }

                from components.release
                artifact androidSourcesJar
                artifact androidJavadocsJar
            }
        }
        if (project.hasProperty('sonatype.username')) {
            repositories {
                maven {
                    name = 'sonatype'
                    url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
                    credentials {
                        username project.getProperty('sonatype.username')
                        password project.getProperty('sonatype.password')
                    }
                }
            }
        }
    }
    if (project.hasProperty('signing.keyId')) {
        signing {
            sign publishing.publications
        }
    }
}
Loading