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

Switch to Gradle as the main build system. #80

Merged
merged 1 commit into from
Oct 24, 2013
Merged

Conversation

JakeWharton
Copy link
Member

Attach a jar for non-Gradle Android users.

@JakeWharton
Copy link
Member Author

BUILD SUCCESSFUL

Total time: 15.84 secs

@holmes
Copy link
Collaborator

holmes commented Sep 27, 2013

So what happens to checkstyle?

@JakeWharton
Copy link
Member Author

The checkstyle plugin relies on the java plugin. Since we're using the android plugin we can't use it... Or at least I haven't found a way to use it yet.

@holmes
Copy link
Collaborator

holmes commented Sep 27, 2013

Sorry, but...

Pull Requests that have a failing status can’t be merged from a phone.

@JakeWharton
Copy link
Member Author

Updated. Checkstyle is back in action.

BUILD SUCCESSFUL

Total time: 13.137 secs

Attach a jar for non-Gradle Android users.
@JakeWharton
Copy link
Member Author

@edenman @holmes ping

@edenman
Copy link
Contributor

edenman commented Oct 22, 2013

LGTM

JakeWharton added a commit that referenced this pull request Oct 24, 2013
Switch to Gradle as the main build system.
@JakeWharton JakeWharton merged commit 32c08a5 into master Oct 24, 2013
@JakeWharton JakeWharton deleted the jw/gradle branch October 24, 2013 06:47
@raulraja
Copy link

raulraja commented Feb 3, 2014

I've noticed that when including...

android.libraryVariants.all { variant ->
  def name = variant.buildType.name
  if (name.equals(com.android.builder.BuilderConstants.DEBUG)) {
    return; // Skip debug builds.
  }
  def task = project.tasks.create "jar${name.capitalize()}", Jar
  task.dependsOn variant.javaCompile
  task.from variant.javaCompile.destinationDir
  artifacts.add('archives', task);
}

and

uploadArchives {
    repositories {
        mavenDeployer {
            ...

            pom.project {
                packaging POM_PACKAGING
                 ...
            }

        }
    }
}

It overrides the packaging. So if you had 'aar' as packaging it will actually remove the property and default to the 'jar' default packaging. This causes the 'aar' not getting downloaded when the dependencies are expressed somewhere else and if you use @aar in the dependency declaration then the transitive dependencies are not downloaded.

Have you guys run into this issue? If so is there a proper way to specify the deployment as packaging 'aar' and still include the jars? Thx

@JakeWharton
Copy link
Member Author

One packaging or the other is going to be without a pom since an artifact can only have one. Your best bet would be publishing two artifacts it would seem. We currently don't have anything set up to do this yet.

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

5 participants