Issue#67 Define deployment of libraries to GitHub

This commit is contained in:
Gergely Hegedus 2022-07-12 12:58:01 +03:00
parent b8b2e0e29e
commit 6156e9457f
7 changed files with 61 additions and 6 deletions

View 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")
}
}
}
}
}

View file

@ -27,7 +27,6 @@ project.ext {
arch_core_version = "2.1.0"
testing_livedata_version = "1.2.0"
mockito_version = "4.0.0"
println("MYLOG versions set")
junit5_version = "5.7.0"
json_assert_version = "1.5.0"
junit4_version = "4.13.2"