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

Create a Maven repository on package #21851

Merged
merged 1 commit into from Oct 3, 2018
Merged

Create a Maven repository on package #21851

merged 1 commit into from Oct 3, 2018

Conversation

@paulrouget
Copy link
Contributor

paulrouget commented Oct 2, 2018

This new step will go through all the release builds of the servoview AAR, and create a maven repo (just a tree of directories) with the relevant POM files under target/gradle/servoview/maven.

For example, after building for armv7 and x86, it looks like this:

/Users/paul/git/servo/target/gradle/servoview/maven
└── org
    └── mozilla
        └── servoview
            ├── servoview-armv7
            │   ├── 0.0.1.20181002
            │   │   ├── servoview-armv7-0.0.1.20181002.aar
            │   │   ├── servoview-armv7-0.0.1.20181002.aar.md5
            │   │   ├── servoview-armv7-0.0.1.20181002.aar.sha1
            │   │   ├── servoview-armv7-0.0.1.20181002.pom
            │   │   ├── servoview-armv7-0.0.1.20181002.pom.md5
            │   │   └── servoview-armv7-0.0.1.20181002.pom.sha1
            │   ├── maven-metadata.xml
            │   ├── maven-metadata.xml.md5
            │   └── maven-metadata.xml.sha1
            └── servoview-x86
                ├── 0.0.1.20181002
                │   ├── servoview-x86-0.0.1.20181002.aar
                │   ├── servoview-x86-0.0.1.20181002.aar.md5
                │   ├── servoview-x86-0.0.1.20181002.aar.sha1
                │   ├── servoview-x86-0.0.1.20181002.pom
                │   ├── servoview-x86-0.0.1.20181002.pom.md5
                │   └── servoview-x86-0.0.1.20181002.pom.sha1
                ├── maven-metadata.xml
                ├── maven-metadata.xml.md5
                └── maven-metadata.xml.sha1

This change is Reviewable

@paulrouget paulrouget changed the title Create a Maven repository on build Create a Maven repository on package Oct 2, 2018
@paulrouget
Copy link
Contributor Author

paulrouget commented Oct 2, 2018


uploadArchives {
doFirst {
for ( arch in ["arm", "armv7", "arm64", "x86"] ) {

This comment has been minimized.

Copy link
@MortimerGoro

MortimerGoro Oct 2, 2018

Contributor

We can drop normal "arm", it's already deprecated. There aren't Android 4+ devices which support armeabi but not armeabi-v7a, so we can safely drop armeabi and save some compilation work & upload bandwidth. We can remove armeabi also from Servo cloud compilation tests if it's still there.

This comment has been minimized.

Copy link
@MortimerGoro

MortimerGoro Oct 2, 2018

Contributor

Other than that code looks good ;)

@jdm
Copy link
Member

jdm commented Oct 2, 2018

What if we add a new flag to the package command to cause the maven generation to happen? Is it common to want a maven repo for local release builds?

}
repositories.mavenDeployer {
repository(url: "file://localhost/${buildDir}/maven")
def version = "0.0.1." + new Date().format('yyyyMMdd')

This comment has been minimized.

Copy link
@MortimerGoro

MortimerGoro Oct 2, 2018

Contributor

There may be collisions if we deploy 2 builds on the same day. It may be a good idea to add a commit id abbreviation to the end to avoid conflicts and be able to link the build to a specific commit

This comment has been minimized.

Copy link
@paulrouget

paulrouget Oct 2, 2018

Author Contributor

Done.

@MortimerGoro
Copy link
Contributor

MortimerGoro commented Oct 2, 2018

yes, we should add something as a package flag to make this optional, it shouldn't upload to maven by default on a local package command or PR automatic testing.

Are we going to deploy on every commit to servo master? on the Gecko android side they only deploy when inbound is merged to central. Is there a similar grouping on Servo to publish the nightly snapshots?

@paulrouget
Copy link
Contributor Author

paulrouget commented Oct 2, 2018

We can drop normal "arm"

I'll file a follow-up issue for that. This requires changes that are beyond this PR.

Edit: issue #21854

@paulrouget
Copy link
Contributor Author

paulrouget commented Oct 2, 2018

This change doesn't upload/deploy anything. It only creates the Maven directory structure that can be re-use locally by other projects.

Before this PR, the AAR would be copied to target/XXX/servoview.aar, now it's also copied under target/gradle/servoview/maven, alongside the POM file. That's it.

So far, third party projects do not use a local maven repo but a direct link to the AAR (servoviewLocal in user.properties). It's convenient and easy, we're going to keep it that way.

I will add a flag to create the maven repo.

@paulrouget paulrouget force-pushed the paulrouget:maven branch from 3e3dfa3 to 2368502 Oct 2, 2018
@paulrouget
Copy link
Contributor Author

paulrouget commented Oct 2, 2018

I added a flag: mach package --android --maven.

To deploy, build with --android, package with --android and --maven, and upload/rsync target/gradle/servoview/maven.

Note: if a x86 build is present along armv7, this will also package the x86 aar.

@paulrouget paulrouget force-pushed the paulrouget:maven branch from 2368502 to 036a527 Oct 2, 2018
@paulrouget paulrouget force-pushed the paulrouget:maven branch from 036a527 to 54d7788 Oct 2, 2018
@paulrouget
Copy link
Contributor Author

paulrouget commented Oct 2, 2018

@paulrouget
Copy link
Contributor Author

paulrouget commented Oct 3, 2018

@bors-servo r=MortimerGoro

@bors-servo
Copy link
Contributor

bors-servo commented Oct 3, 2018

📌 Commit 54d7788 has been approved by MortimerGoro

@bors-servo
Copy link
Contributor

bors-servo commented Oct 3, 2018

Testing commit 54d7788 with merge 021a24d...

bors-servo added a commit that referenced this pull request Oct 3, 2018
Create a Maven repository on package

This new step will go through all the *release* builds of the servoview AAR, and create a maven repo (just a tree of directories) with the relevant POM files under `target/gradle/servoview/maven`.

For example, after building for armv7 and x86, it looks like this:

```
/Users/paul/git/servo/target/gradle/servoview/maven
└── org
    └── mozilla
        └── servoview
            ├── servoview-armv7
            │   ├── 0.0.1.20181002
            │   │   ├── servoview-armv7-0.0.1.20181002.aar
            │   │   ├── servoview-armv7-0.0.1.20181002.aar.md5
            │   │   ├── servoview-armv7-0.0.1.20181002.aar.sha1
            │   │   ├── servoview-armv7-0.0.1.20181002.pom
            │   │   ├── servoview-armv7-0.0.1.20181002.pom.md5
            │   │   └── servoview-armv7-0.0.1.20181002.pom.sha1
            │   ├── maven-metadata.xml
            │   ├── maven-metadata.xml.md5
            │   └── maven-metadata.xml.sha1
            └── servoview-x86
                ├── 0.0.1.20181002
                │   ├── servoview-x86-0.0.1.20181002.aar
                │   ├── servoview-x86-0.0.1.20181002.aar.md5
                │   ├── servoview-x86-0.0.1.20181002.aar.sha1
                │   ├── servoview-x86-0.0.1.20181002.pom
                │   ├── servoview-x86-0.0.1.20181002.pom.md5
                │   └── servoview-x86-0.0.1.20181002.pom.sha1
                ├── maven-metadata.xml
                ├── maven-metadata.xml.md5
                └── maven-metadata.xml.sha1
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21851)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 3, 2018

@bors-servo bors-servo merged commit 54d7788 into servo:master Oct 3, 2018
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
homu Test successful
Details
FxR / Servo / Immersive Mode automation moved this from Todo to Done Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.