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

Kotlin project problem #1

Open
davidpodhola opened this issue Feb 15, 2018 · 3 comments
Open

Kotlin project problem #1

davidpodhola opened this issue Feb 15, 2018 · 3 comments

Comments

@davidpodhola
Copy link

Following the instructions to add project test, I get this warning

> Configure project :
Gradle now uses separate output directories for each JVM language, but this build assumes a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0
        at build_6fro0prhrczp7fhe7kzk924yq$_run_closure2$_closure13$_closure16.doCall(/home/david/dev/osgi-starterkit/build.gradle:89)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

> Task :test:bndJar
-----------------
Warnings
000: test: Unused Export-Package instructions: [software.hsharp.demo*] 
001: test: The JAR is empty: The instructions for the JAR named test did not cause any content to be included, this is likely wrong

I also changed the kotlin version in the build.gradle to

ext.kotlin_version = '1.2.21'

screenshot from 2018-02-15 17-42-09

The resulting JAR is really empty so the servlet does not work.

screenshot from 2018-02-15 17-45-45

@davidpodhola
Copy link
Author

@bluekvirus
Copy link
Owner

bluekvirus commented Feb 16, 2018

Hey @davidpodhola, your /bin folder looks empty in the screenshot, have you tried to compile before building the jar out of the *.class in the /bin? I will double check with a Kotlin demo project later. I didn't use BND plugin in any way so no worries there.

@davidpodhola
Copy link
Author

davidpodhola commented Feb 16, 2018

Hi, thanks a lot.

When I do

gradle :test:build

I get again

Warnings
000: test: Unused Export-Package instructions: [software.hsharp.demo*] 
001: test: The JAR is empty: The instructions for the JAR named test did not cause any content to be included, this is likely wrong

screenshot from 2018-02-16 07-13-25

BTW

  • Kotlin classes ARE generated in /subprojects/test/classes/kotlin/main folder.
  • when compiling from IDEA, Kotlin classes are generated in the /subprojects/test/bin/ folder. The get deleted as soon as I run the build from the command line

davidpodhola added a commit to davidpodhola/osgi-starterkit that referenced this issue Feb 16, 2018
Just a WIP from my computer
davidpodhola added a commit to davidpodhola/osgi-starterkit that referenced this issue Feb 19, 2018
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