Kotlin-DSL-Samples | This Repo contains samples of Kotlin DSLs
kandi X-RAY | Kotlin-DSL-Samples Summary
kandi X-RAY | Kotlin-DSL-Samples Summary
This Repo contains samples of Kotlin DSLs
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Kotlin-DSL-Samples
Kotlin-DSL-Samples Key Features
Kotlin-DSL-Samples Examples and Code Snippets
Community Discussions
Trending Discussions on Kotlin-DSL-Samples
QUESTION
When I create an empty project with Gradle Kotlin DSL, even without any modifications, it would prompt Cannot access script base class 'org.gradle.kotlin.dsl.KotlinBuildScript'. Check your module classpath for missing or conflicting dependencies
The project can run, but the syntax highlighting and autocompletion for build.gradle.kts
don't work.
- https://github.com/gradle/kotlin-dsl-samples/issues/1308
- Changing gradle executable to
gradle-kotlin-dsl-5.2-20190122225509+0000-all.zip
- Changing gradle executable to
- https://youtrack.jetbrains.com/issue/KT-38296
- Remove empty SDKs in Project structure dialog
- Invalidate caches and restart
- Reinstalling Java 11
brew install java11
- Switching to official oracle JDK 15
brew install oracle-jdk
- https://youtrack.jetbrains.com/issue/KT-41141
- Re-adding SDKs in the SDK menu
- Adding
/Kotlin/kotlinc/lib
to Kotlin SDK's classpath
- http://youtrack.jetbrains.com/issue/IDEA-245027
- Deleting the cache folder manually
ANSWER
Answered 2021-Jan-21 at 16:25Answer credit to @AlexeyBelkov - Answered here: https://youtrack.jetbrains.com/issue/KTIJ-893
The syntax highlighting feature worked after:
- Delete
~/.gradle/caches
- Delete
~/Library/Application\ Support/Library/JetBrains/IntelliJIdea2020.3
- Delete
/.gradle
- Delete
/.idea
- Start IDEA and reimport the project.
QUESTION
I have a multi-platform Kotlin project, which contains multiple modules (subprojects). The Building Multiplatform Projects with Gradle documentation of Kotlin clearly shows how to set up project dependencies between modules:
...ANSWER
Answered 2019-Nov-23 at 23:18To establish a dependency of this sort between single-platform projects, you would normally need to create a Gradle Configuration
in the producer project, add the test compilation outputs or a test JAR into that configuration, and, in the consumer project, depend on that configuration (i.e. add a project(...)
dependency with an explicit configuration or, more preferrable, add attributes to ensure that Gradle chooses the test-outputs configuration in variant-aware dependency resolution).
However, all of this requires that tests are compiled to a form that could be reused by the consumer project's common source sets. With Kotlin Multiplatform projects, this is not yet the case. While the production common source sets, which participate in published compilations, are compiled to Kotlin metadata (*.kotlin_metadata
files), test sources and other kinds of non-published code are not yet transformed to that format.
Instead, tests are currently only compiled to the final platform-specific binaries (i.e. *.class
files, *.js
, Native binaries), which cannot be used for common sources analysis.
Therefore, dependencies of this kind are not supported yet. This could change in the future. Please follow this issue in the Kotlin issue tracker: KT-35073.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Kotlin-DSL-Samples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page