简体   繁体   English

我应该如何使用 Intellij Idea 创建我的 Kotlin 多模块项目?

[英]How should I create my Kotlin multi-module project with Intellij Idea?

I want to create a Kotlin project with Gradle as a build tool that has 3 modules:我想用 Gradle 创建一个 Kotlin 项目作为具有 3 个模块的构建工具:

  • A core module that contains the "business logic" (the entities that I will use and all the stuff I need to implement the logic of my app) used by the other modules一个core模块,包含其他模块使用的“业务逻辑”(我将使用的实体以及实现我的应用程序逻辑所需的所有内容)
  • A cli module that uses picocli to create a command line utility使用 picocli 创建命令行实用程序的cli模块
  • A desktop module that uses Jetpack Compose for Desktop to build the UI使用 Jetpack Compose for Desktop 构建 UI 的desktop模块

Is this a use case for Kotlin Multiplatform?这是 Kotlin Multiplatform 的用例吗? What (and how) can I do with some kind of wizard and what do I have to do by hand?我可以使用某种向导做什么(以及如何做)以及我必须手动做什么?
And if not Kotlin Multiplatform, how do I setup the whole thing?如果不是 Kotlin Multiplatform,我该如何设置整个过程?

Yes, this very much is a use case for Kotlin Multiplatform.是的,这是 Kotlin Multiplatform 的一个用例。

In IntelliJ use the menu to create a new project and select "Kotlin Multiplatform App".在 IntelliJ 中使用菜单创建一个新项目和 select “Kotlin Multiplatform App”。 That will create the basic structure for you.这将为您创建基本结构。 After that, study study study.之后,学习学习学习。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Kotlin DSL 中为多模块项目创建“基础”gradle 文件? - How to create a "base" gradle file in Kotlin DSL for multi-module project? 使用IntelliJ IDEA构建Gradle多模块的正确结构 - Proper structure for Gradle multi-module builds with IntelliJ IDEA IntelliJ 未获取多模块项目中的 Spring 配置元数据 - Spring configuration metadata in multi-module project not picked up by IntelliJ 多模块项目的 Kotlin 编译错误“未解析的引用” - Kotlin compilation error "Unresolved reference" for multi-module project Kotlin多模块项目依赖关系在测试生命周期中尚未解决 - Kotlin Multi-module Project Dependency is Unresolved in test Lifecycle 如何在 IntelliJ 中创建 Kotlin 项目 - How do I create a Kotlin project in IntelliJ 我正在尝试使用 intellij idea 创建一个 kotlin 项目但无法在 src 文件下创建 kotlin 文件 - I am trying to create a kotlin project with intellij idea But can't create kotlin file under src file TornadoFX _ Kotlin _ IntelliJ IDEA:由于我在项目中使用 openJDK 8,我怎么可能得到“未解决的参考:javafx”? - TornadoFX _ Kotlin _ IntelliJ IDEA: How is it possible that I am getting an “Unresolved reference: javafx” since I am using openJDK 8 in my project? 在 IntelliJ IDEA 中,创建和执行依赖于我的项目代码的 kotlin 脚本 (.kts) 的正确方法是什么? - In IntelliJ IDEA, what is the proper way to create and execute kotlin scripts (.kts) that depends on code in my project? IntelliJ IDEA Ultimate 2018.3 认为我的 Java 9 项目是 Kotlin 项目 - IntelliJ IDEA Ultimate 2018.3 thinks my Java 9 Project is a Kotlin Project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM