Skip to content

Commit 9c1e19b

Browse files
author
Tangem
committed
${LATEST_TAG}
1 parent ef8cad7 commit 9c1e19b

1 file changed

Lines changed: 53 additions & 11 deletions

File tree

build.gradle.kts

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,58 @@
1-
plugins {
2-
kotlin("jvm") version "1.9.0"
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
google()
5+
mavenCentral()
6+
}
7+
8+
includeBuild("plugins/configuration")
9+
}
10+
11+
val properties = java.util.Properties()
12+
val propertiesFile = File(rootDir.absolutePath, "local.properties")
13+
if (propertiesFile.exists()) {
14+
properties.load(propertiesFile.inputStream())
15+
println("Authenticating user: " + properties.getProperty("gpr.user"))
16+
} else {
17+
println(
18+
"local.properties not found, please create it next to build.gradle and set gpr.user and gpr.key (Create a GitHub package read only + non expiration token at https://github.com/settings/tokens)\n" +
19+
"Or set GITHUB_ACTOR and GITHUB_TOKEN environment variables"
20+
)
321
}
422

5-
repositories {
6-
maven("https://maven.pkg.github.com/tangem/vico") {
7-
credentials {
8-
username = System.getenv("GITHUB_USER")
9-
password = System.getenv("GITHUB_TOKEN")
23+
dependencyResolutionManagement {
24+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
25+
26+
repositories {
27+
flatDir {
28+
dirs("app/libs")
29+
}
30+
google {
31+
content {
32+
includeGroupAndSubgroups("androidx")
33+
includeGroupAndSubgroups("com.android")
34+
includeGroupAndSubgroups("com.google")
35+
}
1036
}
37+
mavenCentral()
38+
mavenLocal {
39+
content {
40+
includeGroupAndSubgroups("com.tangem.vico")
41+
}
42+
}
43+
maven {
44+
// setting any repository from tangem project allows maven search all packages in the project
45+
url = uri("https://maven.pkg.github.com/tangem-developments/vico")
46+
credentials {
47+
username = properties.getProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
48+
password = properties.getProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
49+
}
50+
content {
51+
includeGroupAndSubgroups("com.tangem.vico")
52+
}
53+
}
54+
1155
}
12-
}
1356

14-
dependencies {
15-
implementation("com.tangem.vico.core:core:2.0.0-alpha.25-tangemtest")
16-
}
57+
58+
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

0 commit comments

Comments
 (0)