Issue#67 Define deployment of libraries to GitHub
This commit is contained in:
parent
b8b2e0e29e
commit
6156e9457f
7 changed files with 61 additions and 6 deletions
|
|
@ -19,3 +19,4 @@ android.useAndroidX=true
|
||||||
android.enableJetifier=false
|
android.enableJetifier=false
|
||||||
# Kotlin code style for this project: "official" or "obsolete":
|
# Kotlin code style for this project: "official" or "obsolete":
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
android.disableAutomaticComponentCreation=true
|
||||||
|
|
|
||||||
44
gradlescripts/deploy.aar.gradle
Normal file
44
gradlescripts/deploy.aar.gradle
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
apply plugin: "maven-publish"
|
||||||
|
|
||||||
|
def testUtilVersion = "1.0.0"
|
||||||
|
if (!extensions.extraProperties.has("artifactId")) {
|
||||||
|
throw IllegalStateException("ext.artifactId is not set while applying deploy script")
|
||||||
|
}
|
||||||
|
def testUtilGroupId = "org.fnives.android.testutil"
|
||||||
|
def testUtilArtifactId = extensions.extraProperties.get("artifactId")
|
||||||
|
|
||||||
|
task publishToGitHub(dependsOn: "publishMavenAarPublicationToGitHubPackagesRepository") {
|
||||||
|
group = "Publishing"
|
||||||
|
}
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar) {
|
||||||
|
from android.sourceSets.main.java.srcDirs
|
||||||
|
classifier "sources"
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
mavenAar(MavenPublication) {
|
||||||
|
from components.release
|
||||||
|
|
||||||
|
groupId "$testUtilGroupId"
|
||||||
|
println("$testUtilArtifactId")
|
||||||
|
version "$testUtilVersion"
|
||||||
|
artifactId "$testUtilArtifactId"
|
||||||
|
artifact sourcesJar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "GitHubPackages"
|
||||||
|
url = uri("https://maven.pkg.github.com/fknives/AndroidTest-ShowCase")
|
||||||
|
credentials {
|
||||||
|
username = System.getenv("GITHUB_USERNAME")
|
||||||
|
password = System.getenv("GITHUB_TOKEN")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -27,7 +27,6 @@ project.ext {
|
||||||
arch_core_version = "2.1.0"
|
arch_core_version = "2.1.0"
|
||||||
testing_livedata_version = "1.2.0"
|
testing_livedata_version = "1.2.0"
|
||||||
mockito_version = "4.0.0"
|
mockito_version = "4.0.0"
|
||||||
println("MYLOG versions set")
|
|
||||||
junit5_version = "5.7.0"
|
junit5_version = "5.7.0"
|
||||||
json_assert_version = "1.5.0"
|
json_assert_version = "1.5.0"
|
||||||
junit4_version = "4.13.2"
|
junit4_version = "4.13.2"
|
||||||
|
|
|
||||||
|
|
@ -45,3 +45,6 @@ dependencies {
|
||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$androidx_swiperefreshlayout_version"
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$androidx_swiperefreshlayout_version"
|
||||||
implementation "androidx.core:core-ktx:$androidx_core_version"
|
implementation "androidx.core:core-ktx:$androidx_core_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.artifactId = "android"
|
||||||
|
apply from: "../gradlescripts/deploy.aar.gradle"
|
||||||
|
|
@ -38,3 +38,6 @@ dependencies {
|
||||||
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.artifactId = "android-unit-junit5"
|
||||||
|
apply from: "../gradlescripts/deploy.aar.gradle"
|
||||||
|
|
@ -35,5 +35,7 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "androidx.room:room-testing:$room_version"
|
implementation "androidx.room:room-testing:$room_version"
|
||||||
api project(':test-util-shared-robolectric')
|
api project(':test-util-shared-robolectric')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.artifactId = "shared-android"
|
||||||
|
apply from: "../gradlescripts/deploy.aar.gradle"
|
||||||
|
|
@ -36,3 +36,6 @@ dependencies {
|
||||||
implementation "androidx.room:room-testing:$room_version"
|
implementation "androidx.room:room-testing:$room_version"
|
||||||
implementation "androidx.arch.core:core-testing:$arch_core_version"
|
implementation "androidx.arch.core:core-testing:$arch_core_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.artifactId = "shared-robolectric"
|
||||||
|
apply from: "../gradlescripts/deploy.aar.gradle"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue