Skip to content

Commit

Permalink
chore: update JS default distribution target directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahhaggarty committed Jul 5, 2023
1 parent c5bb655 commit 6f67a14
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/topics/gradle/gradle-configure-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ In the following table, there are the minimum and maximum **fully supported** ve
| KGP version | Gradle min and max versions | AGP min and max versions |
|-------------|-----------------------------------------|-------------------------------------------------------|
| 1.9.0 | %minGradleVersion% – %maxGradleVersion% | %minAndroidGradleVersion% – %maxAndroidGradleVersion% |
| 1.8.20 | 6.8.3 – 7.6.0 | 4.1.3 – 7.2.1 |
| 1.8.0 | 6.8.3 – 7.3.3 | 4.1.3 – 7.4.0 |
| 1.8.20 | 6.8.3 – 7.6.0 | 4.1.3 – 7.4.0 |
| 1.8.0 | 6.8.3 – 7.3.3 | 4.1.3 – 7.2.1 |
| 1.7.20 | 6.7.1 – 7.1.1 | 3.6.4 – 7.0.4 |
| 1.7.0 | 6.7.1 – 7.0.2 | 3.4.3 – 7.0.2 |
| 1.6.20 | 6.1.1 - 7.0.2 | 3.4.3 - 7.0.2 |
Expand Down
12 changes: 8 additions & 4 deletions docs/topics/js/js-project-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ kotlin.js.webpack.major.version=4

The most common webpack adjustments can be made directly via the
`kotlin.js.browser.webpackTask` configuration block in the Gradle build file:
- `outputFileName` - the name of the webpacked output file. It will be generated in `<projectDir>/build/distributions/` after
- `outputFileName` - the name of the webpacked output file. It will be generated in `<projectDir>/build/dist/<targetName>` after
an execution of a webpack task. The default value is the project name.
- `output.libraryTarget` - the module system for the webpacked output. Learn more about [available module systems for
Kotlin/JS projects](js-modules.md). The default value is `umd`.
Expand Down Expand Up @@ -440,7 +440,7 @@ the resulting JavaScript file, which takes more time, but generates executables
the `browserProductionWebpack` task when preparing your project for production use.

Execute either of these tasks to obtain the respective artifacts for development or production. The generated files will
be available in `build/distributions` unless [specified otherwise](#distribution-target-directory).
be available in `build/dist` unless [specified otherwise](#distribution-target-directory).

```bash
./gradlew browserProductionWebpack
Expand Down Expand Up @@ -777,7 +777,11 @@ rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlu

## Distribution target directory

By default, the results of a Kotlin/JS project build reside in the `/build/distribution` directory within the project root.
By default, the results of a Kotlin/JS project build reside in the `/build/dist/<targetName>/<binaryName>` directory within the project root.

> Prior to Kotlin 1.9.0, the default distribution target directory was `/build/distributions`.
>
{type="note" }

To set another location for project distribution files, add the `distribution` block inside `browser` in the build script and
assign a value to the `directory` property.
Expand Down Expand Up @@ -831,7 +835,7 @@ js {
}
```

Note that this does not affect the webpacked output in `build/distributions`.
Note that this does not affect the webpacked output in `build/dist`.

## package.json customization

Expand Down
2 changes: 1 addition & 1 deletion docs/topics/js/js-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ To package all assets in production mode, run the `build` task in Gradle via the
running `./gradlew build`. This generates an optimized project build, applying various improvements such as DCE
(dead code elimination).
Once the build has finished, you can find all the files needed for deployment in `/build/distributions`. They include
Once the build has finished, you can find all the files needed for deployment in `/build/dist`. They include
the JavaScript files, HTML files, and other resources required to run the application. You can put them on a static HTTP server,
serve them using GitHub Pages, or host them on a cloud provider of your choice.
Expand Down

0 comments on commit 6f67a14

Please sign in to comment.