forked from linkedin/dexmaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request linkedin#48 from linkedin/gradle
Merge Gradle branch to master
- Loading branch information
Showing
306 changed files
with
766 additions
and
58,046 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
*.iml | ||
.DS_Store | ||
.idea | ||
target | ||
.gradle | ||
build/ | ||
reports/ | ||
local.properties | ||
external/ | ||
*.ipr | ||
*.iws | ||
*.svn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
language: android | ||
android: | ||
components: | ||
- tools | ||
- platform-tools | ||
- android-25 | ||
- build-tools-25.0.0 | ||
- extra-android-m2repository | ||
- extra-android-support | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
||
script: | ||
- ./gradlew clean build | ||
|
||
branches: | ||
except: | ||
- gh-pages | ||
|
||
notifications: | ||
email: false | ||
|
||
sudo: false | ||
|
||
cache: | ||
directories: | ||
- $HOME/.gradle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Change Log | ||
|
||
## Current Snapshot | ||
|
||
- Project ownership transferred to LinkedIn | ||
- Updated dx dependency to latest tag release from AOSP (7.1.0_r7) and switched from copied source to [Jake Wharton's repackaged artifact](https://github.com/JakeWharton/dalvik-dx) | ||
- Converted tests to run as Android tests rather than in Vogar | ||
- Fixed monitorExit instructions being added as monitorEnter | ||
- Updated Mockito dependency to version 1.10.19 | ||
- Fixed transitive dependency configuration [#22](https://github.com/linkedin/dexmaker/issues/22) | ||
|
||
## Version 1.4 (2015-07-23 | ||
|
||
## Version 1.3 (2015-06-22) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Contributing | ||
|
||
If you would like to contribute to Dexmaker you can do so through Github by forking the repository and sending a pull request. | ||
|
||
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. | ||
|
||
## Bugs | ||
|
||
Please [create an issue](https://github.com/linkedin/dexmaker/issues/new) and include enough information to reproduce the issue you are seeing. | ||
Be sure to include which Android version you're using as well. | ||
|
||
## Feature requests | ||
|
||
Please [create an issue](https://github.com/linkedin/dexmaker/issues/new) to describe the feature and why you think it would be useful. | ||
|
||
## Reporting security issues | ||
|
||
Please report security issues to [[email protected]](mailto:[email protected]) with a subject line of this format: | ||
|
||
`GitHub linkedin/dexmaker - [summary of issue]` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2016 LinkedIn Corp. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Releasing | ||
======== | ||
|
||
1. Change the version in `gradle.properties` to a non-SNAPSHOT version. | ||
2. Update the `CHANGELOG.md` for the impending release. | ||
3. Update the `README.md` with the new version. | ||
4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) | ||
5. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version) | ||
6. `./gradlew clean artifactory distributeBuild` | ||
7. Update the `gradle.properties` to the next SNAPSHOT version. | ||
8. `git commit -am "Prepare next development version."` | ||
9. `git push && git push --tags` | ||
10. Create a new release in the releases tab on GitHub | ||
|
||
|
||
Prerequisites | ||
------------- | ||
|
||
Set the following environment variables: | ||
|
||
* `ARTIFACTORY_USER` - LinkedIn Artifactory username for releasing to `com.linkedin.dexmaker`. | ||
* `ARTIFACTORY_KEY` - LinkedIn Artifactory API key for releasing to `com.linkedin.dexmaker`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import com.linkedin.gradle.DistributeTask | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:2.2.2' | ||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' | ||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4' | ||
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.0" | ||
} | ||
} | ||
|
||
apply plugin: 'com.jfrog.artifactory' | ||
apply plugin: 'maven-publish' | ||
|
||
allprojects { | ||
group = GROUP_ID | ||
} | ||
|
||
artifactoryPublish.skip = true | ||
artifactory { | ||
contextUrl = 'https://linkedin.jfrog.io/linkedin' | ||
publish { | ||
repoKey = 'dexmaker' | ||
username = System.getenv('ARTIFACTORY_USER') ?: "" | ||
password = System.getenv('ARTIFACTORY_KEY') ?: "" | ||
|
||
defaults { | ||
publications 'lib' | ||
} | ||
|
||
publishArtifacts = true | ||
} | ||
clientConfig.setIncludeEnvVars(false) | ||
} | ||
|
||
task distributeBuild(type: DistributeTask) { | ||
dependsOn ':artifactoryPublish', 'dexmaker:artifactoryPublish', 'dexmaker-mockito:artifactoryPublish' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
plugins { | ||
id 'groovy' | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
compile gradleApi() | ||
compile localGroovy() | ||
|
||
compile 'org.ajoberstar:gradle-git:1.2.0' | ||
compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.2' | ||
compile('org.jfrog.buildinfo:build-info-extractor-gradle:4.4.0') { | ||
exclude module: 'groovy-all' | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
buildSrc/src/main/groovy/com/linkedin/gradle/DistributeTask.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.linkedin.gradle | ||
|
||
import groovy.json.JsonBuilder | ||
import org.apache.http.client.fluent.Request | ||
import org.apache.http.entity.ContentType | ||
import org.gradle.api.DefaultTask | ||
import org.gradle.api.tasks.TaskAction | ||
import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention | ||
|
||
class DistributeTask extends DefaultTask { | ||
|
||
@TaskAction | ||
public void distributeBuild() { | ||
ArtifactoryPluginConvention convention = project.convention.plugins.artifactory | ||
def buildNumber = convention.clientConfig.info.buildNumber | ||
def buildName = convention.clientConfig.info.buildName | ||
def context = convention.clientConfig.publisher.contextUrl | ||
def password = convention.clientConfig.publisher.password | ||
|
||
def body = [ | ||
"publish" : "true", | ||
"overrideExistingFiles": "false", | ||
"async" : "true", | ||
"targetRepo" : "maven", | ||
"sourceRepos" : ["dexmaker"], | ||
"dryRun" : "false" | ||
] | ||
|
||
def bodyString = new JsonBuilder(body).toString() | ||
|
||
def content = Request.Post("$context/api/build/distribute/$buildName/$buildNumber") | ||
.bodyString(bodyString, ContentType.APPLICATION_JSON) | ||
.addHeader("X-JFrog-Art-Api", password) | ||
.execute() | ||
.returnContent() | ||
|
||
logger.lifecycle("Distribute Response: {}", content.asString()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'com.jfrog.artifactory' | ||
apply plugin: 'maven-publish' | ||
|
||
version = VERSION_NAME | ||
|
||
targetCompatibility = '1.7' | ||
sourceCompatibility = '1.7' | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
// TODO: fix javadoc errors and then remove this | ||
javadoc.failOnError = false | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
publishing { | ||
publications { | ||
lib(MavenPublication) { | ||
from components.java | ||
|
||
artifact sourcesJar | ||
artifact javadocJar | ||
|
||
pom.withXml { | ||
asNode().children().last() + { | ||
resolveStrategy = Closure.DELEGATE_FIRST | ||
description = "Implementation of the Mockito API for use on the Android Dalvik VM" | ||
url 'https://github.com/linkedin/dexmaker' | ||
scm { | ||
url 'https://github.com/linkedin/dexmaker' | ||
connection 'scm:git:git://github.com/linkedin/dexmaker.git' | ||
developerConnection 'https://github.com/linkedin/dexmaker.git' | ||
} | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/license/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'com.linkedin' | ||
name 'LinkedIn Corp' | ||
email '' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
compile project(":dexmaker") | ||
|
||
compile 'org.mockito:mockito-core:1.10.19' | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.