Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE #41

Closed
pepperoni42069 opened this issue May 28, 2022 · 3 comments
Closed

FEATURE #41

pepperoni42069 opened this issue May 28, 2022 · 3 comments

Comments

@pepperoni42069
Copy link

Kotlin support please.

@Horcrux7
Copy link
Member

What you means with it? Which problems occur with Kotlin? What must be change to support Kotlin?

To save my and your time you should write more details that other can understand and can reproduce your problems.

@pepperoni42069
Copy link
Author

Yes sorry I thought you were already aware that Kotlin doesn't work. Here is my build.gradle

`buildscript {
repositories {
maven { url uri('https://jitpack.io') }
maven { url 'https://repo.spongepowered.org/maven' }
}
dependencies {
classpath 'com.github.i-net-software:jwebassembly-gradle:master-SNAPSHOT'
}
}

plugins {
id "org.jetbrains.kotlin.jvm" version "1.6.21"
}

apply plugin: 'de.inetsoftware.jwebassembly'

group 'org.pepperoni'
version '1.0'

repositories {
maven { url 'https://jitpack.io' }
maven { url 'https://repo.spongepowered.org/maven' }
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/de.inetsoftware/jwebassembly-api
implementation 'com.github.i-net-software:jwebassembly-api:master-SNAPSHOT'
// https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'

}

sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
main.java.srcDirs += 'src/main/java'
}

wasm {
//Get more debug information if there are problems.
//logging.level = LogLevel.DEBUG
//logging.levelInternal = LogLevel.DEBUG

//Change the output format to the text format *.wat.
//This can be helpful to understand the problems if you see the generated code as text format.
//format = 'text'

//The used JWebAssembly compiler version. The default is the latest release '+'.
//You can set any valid Gradle version string or a full dependency string.
//The snapshot version is recommended until a stable release.
//compilerVersion = 0.2
compilerVersion = 'com.github.i-net-software:jwebassembly:master-SNAPSHOT'

//Write method and parameter names into the output *.wasm file.
//The file will be approximate 10% larger. And it generate a source map.
//With a source map you can see in the debugger of the browser your source code if available.
debugNames = true

//Set an absolute or relative path between the final wasm file location and the source files location.
///This is needed for debugging in the browser. It work only if debugNames = true.
//sourceMapBase = '../../src/main/java/'
//sourceMapBase = '/src/main/java/'

//set the destination dir
//destinationDir = file( 'targetDir' )

}
errors.txt
`

@Horcrux7
Copy link
Member

Thanks for reporting this. It was my first kotlin experiment. A very simple sample compile now. If there are more problems then also add your source code sample. I expect that the kotlin compiler produce constructs that JWebAssembly does not can handle correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants