oshai/kotlin-logging

make the lib multi-platform

oshai opened this issue ยท 23 comments

oshai commented
make the lib multi-platform

I would really like this awesome library supporting multiplatform code. There is already attempt using mu.kotlin-logging here: https://github.com/shafirov/klogging, but it does not provide API to be used in multiplatform code.

oshai commented

Do you have an idea or link how to do that? I am not sure what is the level of support in kotlin for such libs.

I referenced only ideas. There is a discussion on supporting the multi-platform projects.

oshai commented

Thanks for the links, seems like not that stable at the moment... So I am still waiting for JB to announce of something official.

Yeah, official support would be really nice. Thank you for all your effort!

oshai commented
Lewik commented

https://github.com/Lewik/klogging can jvm, js and common logging.

oshai commented

changes for this issue are on the multiplatform branch: https://github.com/MicroUtils/kotlin-logging/tree/multiplatform

oshai commented

release 1.5.3 is from multiplatform branch, currently only jvm version but you are welcome to try.

oshai commented

All work was merged to master. There is no js artifact yet but repo is ready for that.

oshai commented

No, currently this issue is only related to jvm/js. But it is true that in the future we should have native flavour as well.

Lewik commented

@joelhandwell if it not difficult, I'll try to implement it in https://github.com/Lewik/klogging I'll notify you about it.

oshai commented

@LDVSOFT @Lewik - if you can test common + js from here: https://github.com/MicroUtils/kotlin-logging/releases/tag/1.5.5 it will be great. Also, any comments on the implementation are welcome.

oshai commented

I also published common and js artifacts to bintray/jcenter. feedback is welcome.

Currently maven/gradle build is failing for kotlin/jvm project as it is not able to find the common module.

 > Could not find io.github.microutils:kotlin-logging-common:1.5.5.
     Searched in the following locations:
         file:/home/anindya/.m2/repository/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.pom
         file:/home/anindya/.m2/repository/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.jar
         https://repo.maven.apache.org/maven2/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.pom
         https://repo.maven.apache.org/maven2/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.jar
         https://oss.sonatype.org/content/repositories/snapshots/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.pom
         https://oss.sonatype.org/content/repositories/snapshots/io/github/microutils/kotlin-logging-common/1.5.5/kotlin-logging-common-1.5.5.jar

Do you have any plan to publish the common artifact to central maven repo? For the time being I have added jcenter() to the build repository of my gradle script.

oshai commented

I was hoping I will not have to, it will break usage for existing users trying to upgrade.
I will try to define source-sets to overcome this issue.

oshai commented

@anidotnet - thanks for reporting. seems something was changed between Kotlin versions 1.2.30->1.2.40 in pom generation. I will try to ask around.
In the meanwhile, I created version 1.5.6 that should be ok. It will be great if you can verify that.

@oshai I still could not see the new version 1.5.6 in central maven repo.
EDIT: I can see it now and it compiles without any issues. Thanks ๐Ÿ‘

oshai commented

Please vote for this issue, as it prevents us from upgrading kotlin version: https://youtrack.jetbrains.com/issue/KT-25799

oshai commented

I published version 1.5.9 to maven central which I hope will solve the issue with missing artifacts. There is still a broken build in Travis that I am handling because of js tests issue. If you see any other errors please open a new issue.