Skip to content

Commit

Permalink
Add access to Github packages
Browse files Browse the repository at this point in the history
  • Loading branch information
sylwester-zielinski committed Jul 26, 2024
1 parent 6a03b50 commit 5b627e0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jul 04 07:32:53 CEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
30 changes: 26 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,38 @@ pluginManagement {
}

dependencyResolutionManagement {
versionCatalogs {
val externalLibs by creating {
from("com.arithings.mobile:version-catalog:1.0.5")
}
}

val props = java.util.Properties()
val localPropsFile = file("$rootDir/local.properties")
if (localPropsFile.exists()) {
props.load(java.io.FileInputStream(localPropsFile))
}

val githubUsername = System.getenv("PUBLISH_GITHUB_USERNAME") ?: props["GITHUB_USERNAME"]?.toString()
val githubPassword = System.getenv("PUBLISH_GITHUB_PASSWORD") ?: props["GITHUB_PASSWORD"]?.toString()

val githubPackages = listOf(
"https://maven.pkg.github.com/airthings/android-version-catalog",
)

repositories {
mavenLocal()
gradlePluginPortal()
google()
mavenCentral()
}

versionCatalogs {
val externalLibs by creating {
from("com.arithings.mobile:version-catalog:1.0.5")
githubPackages.forEach { uri ->
maven(uri) {
credentials {
username = githubUsername
password = githubPassword
}
}
}
}
}

0 comments on commit 5b627e0

Please sign in to comment.