Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

publish with craft #261

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

publish with craft #261

wants to merge 3 commits into from

Conversation

bruno-garcia
Copy link
Member

No description provided.

@bruno-garcia bruno-garcia changed the title Chore/craft publish with craft Feb 6, 2020
@bruno-garcia
Copy link
Member Author

@marandaneto still missing the bintray target on craft which I'll start next.
The problem is splitting the bintrayUpload gradle target so that it takes the already built artifacts, instead of running gradle build bintrayUpload and publishing new artifacts built locally.

@bruno-garcia
Copy link
Member Author

When adding the code to publish artifacts to zeus I realized the following:

image

Packages are not self contained. And the name of the pom file doesn't include the name of the package it relates to.

So we could rename each of the files by prepending the package name but I'm not yet sure there's any easy way to upload the .jar and .aar with these pom files to bintray.

I noticed we're not publishing anything to maven central yet. Whatever we do here has to be with the end result of having this stuff on jcenter and maven central.

Comment on lines +52 to +54
val version = "2.0.0-rc03" // updated by craft
val description = "SDK for sentry.io"
// TODO: change version code to publish new version, follow the pattern of `version`
val buildVersionCode = 20014
val buildVersionCode = 20014 // updated by craft
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend moving these properties away from here to https://github.com/getsentry/sentry-android/blob/master/gradle.properties

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the benefit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not much tbh, it's a key/value props file and it'd be easier to change with a CLI tool

# Add the new version
sed -i '' -e "s/val version = \"\(.*\)\" \/\/ updated by craft/val version = \"$NEW_VERSION\" \/\/ updated by craft/g" buildSrc/src/main/java/Config.kt
# Increment the buildVersionCode
perl -pi -e 's{val buildVersionCode = (\d+) // updated by craft}{$n=$1+1; "val buildVersionCode = $n // updated by craft"}e' buildSrc/src/main/java/Config.kt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildVersionCode could be a hash from current date + incremental value, so it's easier to track. like sentry's semverish suggest, what do you think?

Comment on lines +6 to +7
zeus upload -t "application/zip+aar" ./*/build/outputs/aar/*release.aar
zeus upload -t "application/zip+jar" ./*/build/libs/*release.jar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's about poms? eg
build/publications/release/pom-default.xml
or even *javadocs.jar, *sources.jar?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jars are all match the pattern. The pom is not because their names are all the same. I mentioned on slack. Wither we rename or find another way

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true about the pom files, but not for sources and javadocs files as they have a *-sources.jar and *-javadocs.jar pattern if I recall it well.

@bruno-garcia
Copy link
Member Author

@marandaneto Are we publishing using the artifacts?
Do I need to bundle them in a zip or something and upload to zeus/GCP?

@marandaneto marandaneto marked this pull request as draft May 11, 2020 17:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants