|
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 | + ) |
3 | 21 | } |
4 | 22 |
|
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 | + } |
10 | 36 | } |
| 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 | + |
11 | 55 | } |
12 | | -} |
13 | 56 |
|
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