diff --git a/analyticsServices/build.gradle b/analyticsServices/build.gradle index 5d33cd8..5bdf78e 100644 --- a/analyticsServices/build.gradle +++ b/analyticsServices/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } apply from: '../scripts/productFlavor.gradle' @@ -33,6 +34,63 @@ android { } } +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +publishing { + repositories { + maven { + name = "GithubPackages" + url = uri("https://maven.pkg.github.com/computerrock/gms-hms-wrapper") + credentials { + username = properties.getProperty("GITHUB_USER") + password = properties.getProperty("GITHUB_PERSONAL_ACCESS_TOKEN") + } + } + maven { + name = 'MyRepo' + url = "file://${buildDir}/repo" + } + } + + publications { + analyticsGMS(MavenPublication) { + groupId "com.computerrock" + artifactId "analytics-gms" + version "1.0.0" + artifact("$buildDir/outputs/aar/analyticsServices-gms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + analyticsHMS(MavenPublication) { + groupId "com.computerrock" + artifactId "analytics-hms" + version "1.0.0" + artifact("$buildDir/outputs/aar/analyticsServices-hms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + } +} + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" diff --git a/basement/build.gradle b/basement/build.gradle index b6a741c..bc47e42 100644 --- a/basement/build.gradle +++ b/basement/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } apply from: '../scripts/productFlavor.gradle' @@ -37,6 +38,63 @@ android { } } +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +publishing { + repositories { + maven { + name = "GithubPackages" + url = uri("https://maven.pkg.github.com/computerrock/gms-hms-wrapper") + credentials { + username = properties.getProperty("GITHUB_USER") + password = properties.getProperty("GITHUB_PERSONAL_ACCESS_TOKEN") + } + } + maven { + name = 'MyRepo' + url = "file://${buildDir}/repo" + } + } + + publications { + basementGMS(MavenPublication) { + groupId "com.computerrock" + artifactId "basement-gms" + version "1.0.0" + artifact("$buildDir/outputs/aar/basement-gms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + basementHMS(MavenPublication) { + groupId "com.computerrock" + artifactId "basement-hms" + version "1.0.0" + artifact("$buildDir/outputs/aar/basement-hms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + } +} + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" diff --git a/locationServices/build.gradle b/locationServices/build.gradle index bd5a651..8e59422 100644 --- a/locationServices/build.gradle +++ b/locationServices/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } apply from: '../scripts/productFlavor.gradle' @@ -37,6 +38,63 @@ android { } } +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +publishing { + repositories { + maven { + name = "GithubPackages" + url = uri("https://maven.pkg.github.com/computerrock/gms-hms-wrapper") + credentials { + username = properties.getProperty("GITHUB_USER") + password = properties.getProperty("GITHUB_PERSONAL_ACCESS_TOKEN") + } + } + maven { + name = 'MyRepo' + url = "file://${buildDir}/repo" + } + } + + publications { + basementGMS(MavenPublication) { + groupId "com.computerrock" + artifactId "location-gms" + version "1.0.0" + artifact("$buildDir/outputs/aar/locationServices-gms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + basementHMS(MavenPublication) { + groupId "com.computerrock" + artifactId "location-hms" + version "1.0.0" + artifact("$buildDir/outputs/aar/locationServices-hms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + } +} + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" diff --git a/pushServices/build.gradle b/pushServices/build.gradle index 1eb4fca..60bd05a 100644 --- a/pushServices/build.gradle +++ b/pushServices/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } apply from: '../scripts/productFlavor.gradle' @@ -37,6 +38,63 @@ android { } } +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +publishing { + repositories { + maven { + name = "GithubPackages" + url = uri("https://maven.pkg.github.com/computerrock/gms-hms-wrapper") + credentials { + username = properties.getProperty("GITHUB_USER") + password = properties.getProperty("GITHUB_PERSONAL_ACCESS_TOKEN") + } + } + maven { + name = 'MyRepo' + url = "file://${buildDir}/repo" + } + } + + publications { + basementGMS(MavenPublication) { + groupId "com.computerrock" + artifactId "push-gms" + version "1.0.0" + artifact("$buildDir/outputs/aar/pushServices-gms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + basementHMS(MavenPublication) { + groupId "com.computerrock" + artifactId "push-hms" + version "1.0.0" + artifact("$buildDir/outputs/aar/pushServices-hms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + } +} + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" diff --git a/tasks/build.gradle b/tasks/build.gradle index 6bf07f0..6143cff 100644 --- a/tasks/build.gradle +++ b/tasks/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } apply from: '../scripts/productFlavor.gradle' @@ -37,6 +38,63 @@ android { } } +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +publishing { + repositories { + maven { + name = "GithubPackages" + url = uri("https://maven.pkg.github.com/computerrock/gms-hms-wrapper") + credentials { + username = properties.getProperty("GITHUB_USER") + password = properties.getProperty("GITHUB_PERSONAL_ACCESS_TOKEN") + } + } + maven { + name = 'MyRepo' + url = "file://${buildDir}/repo" + } + } + + publications { + basementGMS(MavenPublication) { + groupId "com.computerrock" + artifactId "tasks-gms" + version "1.0.0" + artifact("$buildDir/outputs/aar/tasks-gms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + basementHMS(MavenPublication) { + groupId "com.computerrock" + artifactId "tasks-hms" + version "1.0.0" + artifact("$buildDir/outputs/aar/tasks-hms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + } +} + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" diff --git a/vision/build.gradle b/vision/build.gradle index e374832..576bda3 100644 --- a/vision/build.gradle +++ b/vision/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } apply from: '../scripts/productFlavor.gradle' @@ -37,6 +38,63 @@ android { } } +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +publishing { + repositories { + maven { + name = "GithubPackages" + url = uri("https://maven.pkg.github.com/computerrock/gms-hms-wrapper") + credentials { + username = properties.getProperty("GITHUB_USER") + password = properties.getProperty("GITHUB_PERSONAL_ACCESS_TOKEN") + } + } + maven { + name = 'MyRepo' + url = "file://${buildDir}/repo" + } + } + + publications { + basementGMS(MavenPublication) { + groupId "com.computerrock" + artifactId "vision-gms" + version "1.0.0" + artifact("$buildDir/outputs/aar/vision-gms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + basementHMS(MavenPublication) { + groupId "com.computerrock" + artifactId "vision-hms" + version "1.0.0" + artifact("$buildDir/outputs/aar/vision-hms-release.aar") + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + //Iterate over the compile dependencies (we don't want the test ones), adding a node for each + configurations.api.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } + } + } +} + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"