square / assertj-android

A set of AssertJ helpers geared toward testing Android.
https://square.github.io/assertj-android/
Apache License 2.0
1.58k stars 156 forks source link

Switch to Gradle as the main build system. #80

Closed JakeWharton closed 11 years ago

JakeWharton commented 11 years ago

Attach a jar for non-Gradle Android users.

JakeWharton commented 11 years ago
BUILD SUCCESSFUL

Total time: 15.84 secs
holmes commented 11 years ago

So what happens to checkstyle?

JakeWharton commented 11 years ago

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 commented 11 years ago

Sorry, but...

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

JakeWharton commented 11 years ago

Updated. Checkstyle is back in action.

BUILD SUCCESSFUL

Total time: 13.137 secs
JakeWharton commented 11 years ago

@edenman @holmes ping

edenman commented 11 years ago

LGTM

raulraja commented 10 years ago

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 commented 10 years ago

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.