Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCreate a Maven repository on package #21851
Conversation
|
|
||
| uploadArchives { | ||
| doFirst { | ||
| for ( arch in ["arm", "armv7", "arm64", "x86"] ) { |
This comment has been minimized.
This comment has been minimized.
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.
This comment has been minimized.
|
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.
This comment has been minimized.
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.
This comment has been minimized.
|
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 |
I'll file a follow-up issue for that. This requires changes that are beyond this PR. Edit: issue #21854 |
|
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. |
|
I added a flag: 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. |
|
@bors-servo r=MortimerGoro |
|
|
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 -->
|
|
paulrouget commentedOct 2, 2018
•
edited by SimonSapin
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:
This change is