Skip to content

Commit 1c52157

Browse files
committed
fixed issue with storeGitHubCredentials logic
1 parent 1287721 commit 1c52157

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The `private-repository-plugin` is a simple plugin for making dependencies on pr
55
Simply include the following as a gradle plugin:
66
```yaml
77
plugins {
8-
id("com.moneyforward.private-repository") version "0.3.3"
8+
id("com.moneyforward.private-repository") version "0.3.4"
99
}
1010
```
1111

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
group = "com.moneyforward.gradle"
8-
version = "0.3.3"
8+
version = "0.3.4"
99

1010
repositories {
1111
mavenCentral()

src/main/kotlin/com/moneyforward/gradle/PrivateRepositoryPlugin.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ class PrivateRepositoryPlugin : Plugin<Any> {
5353
project.afterEvaluate {
5454
val tasks = it.gradle.startParameter.taskNames
5555
// do not apply repository settings if running the storeGitHubCredentials task
56-
if (tasks.any { task -> task == StoreGitHubCredentialsTask.NAME }) {
56+
if (tasks.none { task -> task == StoreGitHubCredentialsTask.NAME }) {
5757
project.repositories.apply(ProjectPropertyDelegate(project), PROJECT_PLUGIN_DATA)
58-
if (tasks.size > 1) logger.warn(
59-
"{} should be ran in isolation, running it with other tasks may cause unexpected issues.",
60-
StoreGitHubCredentialsTask.NAME
61-
)
58+
}
59+
else if (tasks.size > 1) {
60+
logger.warn("{} should be ran in isolation, running it with other " +
61+
"tasks may cause unexpected issues.", StoreGitHubCredentialsTask.NAME)
6262
}
6363
}
6464
}

0 commit comments

Comments
 (0)