Skip to content
Snippets Groups Projects
Commit e722a028 authored by Taras's avatar Taras
Browse files

Change publishers for all modules

parent 5fa9c9ed
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,12 @@ android {
version '3.22.1'
}
}
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}
dependencies {
......@@ -92,34 +98,15 @@ kapt {
correctErrorTypes = true
}
def groupIdString = "org.futo.circles"
def artifactIdString = "auth-gplay"
publishing {
publications {
release(MavenPublication) {
groupId = rootProject.ext.modules_groupId
artifactId = "auth-gplay"
version rootProject.ext.modules_version
afterEvaluate {
Properties properties = new Properties()
if (rootProject.file("local.properties").exists()) {
properties.load(rootProject.file("local.properties").newDataInputStream())
}
publishing {
publications {
release(MavenPublication) {
afterEvaluate {
from components.gplayRelease
groupId groupIdString
artifactId artifactIdString
version rootProject.ext.modules_version
}
}
repositories {
maven {
url "https://gitlab.futo.org/api/v4/projects/$rootProject.ext.modules_gitlab_projectId/packages/maven"
name "GitLab"
credentials(HttpHeaderCredentials) {
name = "Private-Token"
value = properties.getProperty("PUBLISH_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
......
......@@ -5,7 +5,7 @@ buildscript {
androidx_nav_version = '2.7.6'
hilt_version = '2.50'
modules_version = "1.0.9"
modules_gitlab_projectId = "13"
modules_groupId = "org.futo.gitlab.circles"
}
repositories {
google()
......@@ -26,32 +26,10 @@ allprojects {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://gitlab.futo.org/api/v4/projects/16/packages/maven' }
maven { url 'https://gitlab.futo.org/api/v4/projects/13/packages/maven' }
maven { url 'https://gitlab.futo.org/api/v4/projects/130/packages/maven' }
}
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
tasks.register('cleanBuildPublishModules', GradleBuild) {
tasks.register('assembleModulesRelease') {
dependsOn 'clean'
dependsOn ':core:assembleRelease'
dependsOn ':auth:assembleRelease'
dependsOn ':gallery:assembleRelease'
}
tasks.register('publishModules') {
dependsOn 'assembleModulesRelease'
dependsOn ':core:publish'
dependsOn ':auth:publish'
dependsOn ':gallery:publish'
}
dependsOn 'assembleModulesRelease'
dependsOn 'publishModules'
}
\ No newline at end of file
......@@ -41,6 +41,12 @@ android {
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
]
}
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}
dependencies {
......@@ -70,7 +76,7 @@ dependencies {
kapt "com.google.dagger:hilt-compiler:$rootProject.ext.hilt_version"
//Matrix
api 'org.matrix.android:matrix-sdk-android:1.6.11'
api('org.futo.gitlab.circles:matrix-android-sdk:v1.6.10.8@aar') { transitive = true }
//Retrofit2
def retrofit_version = '2.9.0'
......@@ -121,35 +127,15 @@ kapt {
correctErrorTypes = true
}
publishing {
publications {
release(MavenPublication) {
groupId = rootProject.ext.modules_groupId
artifactId = "core"
version rootProject.ext.modules_version
def groupIdString = "org.futo.circles"
def artifactIdString = "core"
afterEvaluate {
Properties properties = new Properties()
if (rootProject.file("local.properties").exists()) {
properties.load(rootProject.file("local.properties").newDataInputStream())
}
publishing {
publications {
release(MavenPublication) {
afterEvaluate {
from components.release
groupId groupIdString
artifactId artifactIdString
version rootProject.ext.modules_version
}
}
repositories {
maven {
url "https://gitlab.futo.org/api/v4/projects/$rootProject.ext.modules_gitlab_projectId/packages/maven"
name "GitLab"
credentials(HttpHeaderCredentials) {
name = "Private-Token"
value = properties.getProperty("PUBLISH_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
......
......@@ -39,6 +39,12 @@ android {
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
]
}
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}
dependencies {
......@@ -67,35 +73,15 @@ kapt {
}
def groupIdString = "org.futo.circles"
def artifactIdString = "gallery"
def publicationName = "release"
publishing {
publications {
release(MavenPublication) {
groupId = rootProject.ext.modules_groupId
artifactId = "gallery"
version rootProject.ext.modules_version
afterEvaluate {
Properties properties = new Properties()
if (rootProject.file("local.properties").exists()) {
properties.load(rootProject.file("local.properties").newDataInputStream())
}
publishing {
publications {
"$publicationName"(MavenPublication) {
afterEvaluate {
from components.release
groupId groupIdString
artifactId artifactIdString
version rootProject.ext.modules_version
}
}
repositories {
maven {
url "https://gitlab.futo.org/api/v4/projects/$rootProject.ext.modules_gitlab_projectId/packages/maven"
name "GitLab"
credentials(HttpHeaderCredentials) {
name = "Private-Token"
value = properties.getProperty("PUBLISH_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment