Skip to content

Commit

Permalink
Merge pull request #528 from nhn/prepare
Browse files Browse the repository at this point in the history
AndroidX 설정 내용 수정
  • Loading branch information
spin-nhn authored Aug 28, 2024
2 parents 0ceacde + c0b6630 commit 9f4c6f8
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 44 deletions.
45 changes: 23 additions & 22 deletions docs/WebView/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,29 @@ Provides a WebView used in various ways in the game.

#### Gradle settings

1. Go to **File > Build Settings > Player Settings > Android > Publishing Settings** and enable **Custom Main Gradle Template** to create an `Assets/Plugins/Android/mainTemplate.gradle` file.
* ![unity_gradle.png](images/unity_gradle.png)
* If you are already using a mainTemplate.gradle file, you may skip this step.
2. Add dependencies in mainTemplate.gradle.
```gradle
dependencies {
...
// Prerequisites
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
// Add if you are using the ShowSafeBrowsing API
implementation 'androidx.browser:browser:1.3.0'
}
```
* If they are already added in another package, you may skip this step.
3. When using the ShowSafeBrowsing API with Unity 2020.1.0 or higher, activate the **Custom Gradle Properties Template** in **File > Build Settings > Player Settings > Android > Publishing Settings** to create the `Assets/Plugins/Android/gradleTemplate.properties` file.
* ![unity_gradle_properties.png](images/unity_gradle_properties.png)
* Add `android.useAndroidX=true` to the last line of the gradleTemplate.properties file.
```gradle
**ADDITIONAL_PROPERTIES**
android.useAndroidX=true
```
1. Dependencies
1. Go to **File > Build Settings > Player Settings > Android > Publishing Settings** and enable **Custom Main Gradle Template** to create an `Assets/Plugins/Android/mainTemplate.gradle` file.
* ![unity_gradle.png](images/unity_gradle.png)
* If you are already using a mainTemplate.gradle file, you may skip this step.
2. Add dependencies in mainTemplate.gradle.
```gradle
dependencies {
// Prerequisites
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
// Add if you are using the ShowSafeBrowsing API
implementation 'androidx.browser:browser:1.3.0'
}
```
* If they are already added in another package, you may skip this step.
2. Android X
1. Go to **File > Build Settings > Player Settings > Android > Publishing Settings** and enable **Custom Gradle Properties Template** to create an `Assets/Plugins/Android/gradleTemplate.properties` file.
* ![unity_gradle_properties.png](images/unity_gradle_properties.png)
2. Add AndroidX settings to the last line in gradleTemplate.properties file.
```gradle
**ADDITIONAL_PROPERTIES**
android.useAndroidX=true
```

### iOS

Expand Down
48 changes: 26 additions & 22 deletions docs/WebView/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,32 @@

#### Gradle 설정

1. **File > Build Settings > Player Settings > Android > Publishing Settings**에서 **Custom Main Gradle Template**을 활성화하면 `Assets/Plugins/Android/mainTemplate.gradle` 파일이 생성됩니다.
* ![unity_gradle.png](images/unity_gradle.png)
* 사용 중인 mainTemplate.gradle 파일이 있을 때는 생략할 수 있습니다.
2. mainTemplate.gradle에서 dependencies를 추가합니다.
```gradle
dependencies {
...
// 필수 구성 요소
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
// ShowSafeBrowsing API를 사용할 경우 추가
implementation 'androidx.browser:browser:1.3.0'
}
```
* 다른 패키지에서 이미 추가한 경우 해당 과정을 제외할 수 있습니다.
3. Unity 2020.1.0 이상에서 ShowSafeBrowsing API를 사용할 경우 **File > Build Settings > Player Settings > Android > Publishing Settings**에서 **Custom Gradle Properties Template**을 활성화하여 `Assets/Plugins/Android/gradleTemplate.properties` 파일을 생성합니다.
* ![unity_gradle_properties.png](images/unity_gradle_properties.png)
* gradleTemplate.properties 파일의 마지막 줄에 `android.useAndroidX=true`를 추가합니다.
```gradle
**ADDITIONAL_PROPERTIES**
android.useAndroidX=true
```
1. 의존성 추가
1. **File > Build Settings > Player Settings > Android > Publishing Settings**에서 **Custom Main Gradle Template**을 활성화하면 `Assets/Plugins/Android/mainTemplate.gradle` 파일이 생성됩니다.
* ![unity_gradle.png](images/unity_gradle.png)
* 사용 중인 mainTemplate.gradle 파일이 있을 때는 생략할 수 있습니다.
2. mainTemplate.gradle에서 dependencies를 추가합니다.
```gradle
dependencies {
// 필수 구성 요소
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
// ShowSafeBrowsing API를 사용할 경우 추가
implementation 'androidx.browser:browser:1.3.0'
}
```
* 다른 패키지에서 이미 추가한 경우 해당 과정을 제외할 수 있습니다.

2. Android X 설정 추가

1. **File > Build Settings > Player Settings > Android > Publishing Settings**에서 **Custom Gradle Properties Template**을 활성화하면 `Assets/Plugins/Android/gradleTemplate.properties` 파일이 생성됩니다.
* ![unity_gradle_properties.png](images/unity_gradle_properties.png)

2. gradleTemplate.properties 파일의 마지막 줄에 AndroidX 설정을 추가합니다.
```gradle
**ADDITIONAL_PROPERTIES**
android.useAndroidX=true
```

### iOS

Expand Down
2 changes: 2 additions & 0 deletions docs/WebView/ReleaseNotes.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* (Android) Fixed an issue where error codes were passed as strings, causing JSON parsing errors in Unity [(454)](https://github.com/nhn/gpm.unity/issues/454)
* Improved internal logic.

## 2.0.5

### Date

* 2024.04.29
Expand Down

0 comments on commit 9f4c6f8

Please sign in to comment.