Загрузка данных
"// Настройки репозитория
val tokenName: String by project
val tokenPassword: String by project
val nexusPublicRepository: String by project
val nexusInternalRepository: String by project
val sberOscToken: String? = providers.systemProperty("sberOscToken").orNull
group = "ru.sberbank.sber911.aqa"
version = "0.0.1"
plugins {
id("java")
}
repositories {
listOf(nexusPublicRepository, nexusInternalRepository).forEach {
maven {
url = uri(it)
isAllowInsecureProtocol = true
credentials {
username = tokenName
password = tokenPassword
}
}
}
maven {
url = uri("https://sberosc.sigma.sbrf.ru/repo/maven/central/")
isAllowInsecureProtocol = true
credentials {
password = sberOscToken
}
}
}
dependencies {
implementation("com.microsoft.playwright:playwright:1.60.0")
}
tasks.test {
useJUnitPlatform()
}" "// Настройки репозитория
val tokenName: String by project
val tokenPassword: String by project
val nexusPublicRepository: String by project
val nexusInternalRepository: String by project
val sberOscToken: String? = providers.systemProperty("sberOscToken").orNull
// Проект обзываем
group = "ru.sberbank.sber911.aqa"
version = "0.0.1"
plugins {
java
// id("io.qameta.allure") version "4.0.0"
}
java {
toolchain { languageVersion.set(JavaLanguageVersion.of(21)) }
}
repositories {
listOf(nexusPublicRepository, nexusInternalRepository).forEach {
maven {
url = uri(it)
isAllowInsecureProtocol = true
credentials {
username = tokenName
password = tokenPassword
}
}
}
maven {
url = uri("https://sberosc.sigma.sbrf.ru/repo/maven/central/")
isAllowInsecureProtocol = true
credentials {
password = sberOscToken
}
}
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.jupiter:junit-jupiter-api:6.1.0")
implementation ("com.github.automatedowl:allure-environment-writer:1.0.0")
implementation("org.aeonbits.owner:owner:1.0.12")
implementation("io.qameta.allure:allure-junit-platform:2.33.0")
}
tasks {
// Для компиляции ставим кодировку UTF-8
withType<JavaCompile> {
options.encoding = "UTF-8"
}
}
tasks.withType<Test> {
// Считываем параметр -Pparallel (по умолчанию false)
val isParallel = providers.gradleProperty("parallel")
.getOrElse("false")
.toBoolean()
if (isParallel) {
// Уровень Gradle: запускаем в разных JVM процессах
// Рекомендуется: 50% от доступных ядер CPU
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
// Уровень JUnit: параллелизм внутри одной JVM
systemProperties(
"junit.jupiter.execution.parallel.enabled" to "true",
"junit.jupiter.execution.parallel.mode.default" to "concurrent",
"junit.jupiter.execution.parallel.mode.classes.default" to "concurrent"
)
}
}" "
// Устанавливаем имя корневого проекта
rootProject.name = "Sber911 AQA"
include(
"module:functional",
"module:load",
"module:mobile"
)
pluginManagement {
// Получаем токены из ~/.gradle/gradle.properties
val tokenName = providers.systemProperty("tokenName").orNull
val tokenPassword = providers.systemProperty("tokenPassword").orNull
val sberOscToken = providers.systemProperty("sberOscToken").orNull
// val trustStore = System.getProperty("javax.net.ssl.trustStore")
// val trustStorePassword = System.getProperty("javax.net.ssl.trustStorePassword")
val nexusPublicRepository = "https://nexus-ci.delta.sbrf.ru/repository/public/"
val nexusInternalRepository = "https://nexus-ci.delta.sbrf.ru/repository/maven-lib-int/"
repositories {
listOf(nexusPublicRepository, nexusInternalRepository).forEach {
maven {
url = uri(it)
isAllowInsecureProtocol = true
credentials {
username = tokenName
password = tokenPassword
}
}
}
maven {
url = uri("https://sberosc.sigma.sbrf.ru/repo/maven/central/")
isAllowInsecureProtocol = true
credentials {
password = sberOscToken
}
}
}
}" ну и есть gradle.properties с ключами "systemProp.nexus3User=
systemProp.nexus3Password=
systemProp.nexus2User=
systemProp.nexus2Password=
systemProp.sberOscToken=
systemProp.javax.net.ssl.trustStore=
systemProp.javax.net.ssl.trustStorePassword=
systemProp.gradle.wrapperUser=
systemProp.gradle.wrapperPassword=
tokenName=
tokenPassword=", а так же положил сертификат "/home/work/23734@sigma.sbrf.ru/.gradle/cacerts/sberca-test-root-ext" выполнил для этого "keytool -import -trustcacerts -alias SberCaRootExt -file /home/work/23734@sigma..sbrf.ru/.gradle/cacerts/sberca-test-root-ext.crt -keystore /home/work/23734.sbrf.ru/.gradle/cacerts/sberca-test-root-ext -storepass ***"
при попытке скачать библиотеки с внутреннего репозитория - ошибка сертификата