Skip to content

Commit aa2d3f4

Browse files
ファイルの存在チェックを追加。
1 parent 8160395 commit aa2d3f4

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

modules/deviceconnect-codegen/src/main/resources/deviceConnectAndroidPlugin/gradleFiles/3_x_x/plugin.2.8.4.build.gradle.mustache

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ apply plugin: 'com.android.application'
55
// gpr.key=PERSONAL_ACCESS_TOKEN
66
def githubPropertiesFile = rootProject.file("github.properties")
77
def githubProperties = new Properties()
8-
githubProperties.load(new FileInputStream(githubPropertiesFile))
8+
if (githubPropertiesFile.exists()) {
9+
githubProperties.load(new FileInputStream(githubPropertiesFile))
10+
}
911

1012
dependencies {
1113
implementation fileTree(include: '*.jar', dir: 'libs')
@@ -23,7 +25,7 @@ android {
2325
versionCode 1
2426
versionName '1.0.0'
2527
}
26-
28+
2729
compileOptions {
2830
sourceCompatibility 1.8
2931
targetCompatibility 1.8
@@ -52,19 +54,19 @@ android {
5254
exclude 'META-INF/LICENSE'
5355
exclude 'META-INF/NOTICE'
5456
}
55-
57+
5658
tasks.withType(JavaCompile) {
5759
options.encoding = 'UTF-8'
5860
}
5961
repositories {
6062
maven {
6163
name = "DeviceConnect-Android"
62-
url = uri("https://maven.pkg.github.com/TakayukiHoshi1984/DeviceConnect-Android")
64+
url = uri("https://maven.pkg.github.com/DeviceConnect/DeviceConnect-Android")
6365
6466
credentials {
6567
username = System.getenv("GPR_USER") ?: githubProperties['gpr.usr']
6668
password = System.getenv("GPR_API_KEY") ?: githubProperties['gpr.key']
6769
}
6870
}
6971
}
70-
}
72+
}

samples/templates/deviceConnectAndroidPlugin/gradleFiles/3_x_x/plugin.2.8.4.build.gradle.mustache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ apply plugin: 'com.android.application'
55
// gpr.key=PERSONAL_ACCESS_TOKEN
66
def githubPropertiesFile = rootProject.file("github.properties")
77
def githubProperties = new Properties()
8-
githubProperties.load(new FileInputStream(githubPropertiesFile))
9-
8+
if (githubPropertiesFile.exists()) {
9+
githubProperties.load(new FileInputStream(githubPropertiesFile))
10+
}
1011
dependencies {
1112
implementation fileTree(include: '*.jar', dir: 'libs')
1213
implementation 'org.deviceconnect:dconnect-device-plugin-sdk:{{{deviceConnectPluginSdkVersion}}}'

0 commit comments

Comments
 (0)