Hi guys! So, I’m trying to create a GitHub Library...
# getting-started
l
Hi guys! So, I’m trying to create a GitHub Library with Kotlin, it’s still a very early work in progress (here’s the repo: https://github.com/lucasleon2107/KGitHub) but there’s still some thing I need to tackle and not sure/don’t know how to approach them, like: • I’m using Ktor Client for HTTP requests, and you can use different engines for different platform, how can I let the person who’s using the library pick the engine that is more convenient with Gradle? • Which tool should I use for auto bumping the version using semver? • How should I approach test? Should I just mock the api calls? Because in this case there are not much business rules to test • Which tools should I use for CI? Want to prevent code commits without being tested and enforce some code stylings maybe There are more things I’d like to solve but they are not in the top of my head right now but I will add them to the list when I remember then Please feel free to collaborate if you feel like it and I’d like to receive some feedback for this tiny proof of concept that I’m developing. Have a great day!
h
Ktor clients: If you want supporting different engines, you could use
bring your own engine
by simple just require a HttpClient. BTW you actually already use
ktor-client-java
, which uses the Java client as an engine CI: As you already use GitHub, you could use GitHub Actions.
Gradle: I think, you should switch
implementation
and `api`: currently, you consume all ktor api, but don't forward these dependencies, only common maths, which sounds useless for other tools. (and try to use kotlin.math from stdlib)
b
Does anyone know an existing github repo that uses semver with github actions? Be nice to understand how it works. I have been trying myself but no luck so far.
l
@Benoît Liessens hope this can help you https://github.com/marketplace/actions/git-semantic-version
b
Thanks @Lucas León. That’s the one I managed to configure earlier today.