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

Build refactor and bintray plugin replacement #145

Merged
merged 9 commits into from
Sep 15, 2020
Merged

Conversation

altavir
Copy link
Contributor

@altavir altavir commented Sep 15, 2020

Fix fo #126 #130 #144 and partially #45

@YarnSphere
Copy link
Contributor

Also out of curiosity, why did you undo your Generify native build commit?

@altavir
Copy link
Contributor Author

altavir commented Sep 15, 2020

The current upstream build already contains a different way to generify the build. So I decided to keep the upstream version.

@YarnSphere
Copy link
Contributor

Fair enough, I'm just more used to the "default" (as in, the one that comes with a newly generated MPP lib) one.

@oshai
Copy link
Owner

oshai commented Sep 15, 2020

Thanks for the PR. As for the deployment, I guess snapshot releases are the same, how do I perform regular releases? manually?

@altavir
Copy link
Contributor Author

altavir commented Sep 15, 2020

I do regular releases manually from gradle, but you can trigger the deploy process from CI. Exactly the same way, you were doing for bintray plugin. The only difference is that you have to use publishAllPublicationsToBintrayRepository instead of bintrayUpload. The only difference is that maven-publish does not create bintray package automatically, you need to create it manually before the first time you want to push a new artifact. You have it already so no actions needed.

@altavir
Copy link
Contributor Author

altavir commented Sep 15, 2020

Fair enough, I'm just more used to the "default" (as in, the one that comes with a newly generated MPP lib) one.

The difference is in naming and tests. I am not sure that native tests are running correctly in this variant. On the bright side, source set naming is the same for different OS.

@YarnSphere
Copy link
Contributor

@altavir, don't know if you saw what I wrote above, what's all the mipt-npm stuff there?

@altavir
Copy link
Contributor Author

altavir commented Sep 15, 2020

@altavir, don't know if you saw what I wrote above, what's all the mipt-npm stuff there?

Oops. Forgot to clear it out. I will fix it right away. Those are parts of our deploy plugin, I used at first.

@YarnSphere
Copy link
Contributor

Yeah, I thought so, that's why I was asking just to make sure. :)

@YarnSphere
Copy link
Contributor

don't know if you saw what I wrote above

My bad, didn't realise I needed to press "start review" for my comment to be submitted so I didn't actually "write" anything above. :')

@YarnSphere
Copy link
Contributor

@oshai, if you make a snapshot version for testing let me know and I'll give it a go.

@altavir
Copy link
Contributor Author

altavir commented Sep 15, 2020

@nunocastromartins you can use this one: https://bintray.com/mipt-npm/dev/kotlin-logging/1.11.5-npm. It is exactly the same, only with a different repository name.

@YarnSphere
Copy link
Contributor

Ah, thanks, it works fine! I mean, I was already using another version of your fork for testing IR stuff, so I had no doubts that yours would work.

My offer was mostly to check that @oshai got the publishing to work correctly on his end.

@oshai
Copy link
Owner

oshai commented Sep 15, 2020

I will create a snapshot to test ASAP.

@oshai
Copy link
Owner

oshai commented Sep 15, 2020

The snapshot is here: http://oss.jfrog.org/webapp/builds/kotlin-logging/553
Please test it.

@YarnSphere
Copy link
Contributor

Everything seems to be working. :)

Just one question, are you planning to release this as a minor version or version 2.0? I noticed that you named it 1.11.5-SNAPSHOT.

@oshai
Copy link
Owner

oshai commented Sep 15, 2020

It will be version 2.0, thanks for pointing out!
I hope I will get the new deployment correct.

@oshai oshai merged commit bb1f1f5 into oshai:master Sep 15, 2020
@oshai
Copy link
Owner

oshai commented Sep 15, 2020

@altavir - Thank you very much for the PR!

@altavir
Copy link
Contributor Author

altavir commented Sep 15, 2020

You are welcome. Sadly, I will have to use my fork for now since I work on Windows and I need both mingw and Linux native targets (windows generates them both).

@oshai
Copy link
Owner

oshai commented Sep 15, 2020

Snapshot for 2.0.0 is here: http://oss.jfrog.org/webapp/builds/kotlin-logging/555

@oshai oshai mentioned this pull request Sep 15, 2020
@oshai
Copy link
Owner

oshai commented Sep 16, 2020

@altavir I wonder if I can build windows version using travis: https://docs.travis-ci.com/user/reference/windows/
Do you know what is the proper way to deploy from multiple builds machines?

@altavir
Copy link
Contributor Author

altavir commented Sep 16, 2020

@oshai I think that running deploy script from multiple virtual machines with different OSes should do the trick. The build script deploys artifact relevant to the system you are currently using. On windows (at least with WSL installed) it is possible to generate artifacts both for windows and for Linux, so I am deploying everything from the local machine right now. I will play around with multi-system deployment as soon as we finish adding native targets to our libraries.

@oshai
Copy link
Owner

oshai commented Sep 16, 2020

Created #149 we will see how it goes.

@YarnSphere
Copy link
Contributor

Btw @oshai, forgot to report, build 2.0.0-SNAPSHOT works well on my end.

@oshai
Copy link
Owner

oshai commented Sep 20, 2020

@altavir trying to publish I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Task 'publishAllPublicationsToBintrayRepository' not found in root project 'kotlin-logging'.

Any idea what is missing?
I do see a publish task. Is this the one should be used? Using it doesn't upload the artifacts.

@altavir
Copy link
Contributor Author

altavir commented Sep 20, 2020

@oshai I think that the problem is with project properties. This line ensures that bintray repository publication is not registered unless bintrayRepo, bintrayUser and bintrayApiKey are all defined in the properties. It seems like bintrayOrg is needed as well. Probably one of those are missing. You probable could hardcode bintrayRepo and bintrayOrg since it is always the same for you, but user and API key should be defined externally.

@oshai
Copy link
Owner

oshai commented Sep 20, 2020

Thanks, that seems to work!

@oshai
Copy link
Owner

oshai commented Sep 20, 2020

I released 2.0.2 to bintray and maven central. Will update docs soon.

@oshai
Copy link
Owner

oshai commented Sep 20, 2020

@altavir do you know if maven central has similar api to the bintray one so the publish plugin can be used for that as well?

@altavir
Copy link
Contributor Author

altavir commented Sep 20, 2020

@oshai Yes, it should work exactly the same way for maven central, just with a different repository definition. Though maven central has more strict rules about artifact preparation and I never tried that. There are a lot of examples though. Like the official one.

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

Successfully merging this pull request may close these issues.

None yet

3 participants