Skip to content

Switch to Gradle #625

Closed
Closed

Description

@stoyicker

Considering that Google is putting a lot of effort in Android Studio we ( https://github.com/owncloudChalmers/ ) think that introducing the Gradle build system is necessary, both for the android-library repository and this one.

We are already experimenting with it for the library ( https://github.com/owncloudChalmers/android-library buildsystem/gradle_develop, conversion of develop) and are really close to complete it (basically only lacking the Travis CI configuration files). We can also take responsibility for porting the build system for the app repository as well.

It should be mentioned that the default Gradle project structure differs from the Ant one, so switching to it will break compatibility with Ant. However, we believe this is a necessary change.

Activity

  1. davivel commented on Sep 17, 2014

    @davivel
    Contributor

    I totally agree with your arguments to do the swap to Android Studio, and would be awesome get your help to make the swap. Probably you are interested in having a look to our contributor agreement, that needs to be signed before we accept any contribution. Here: https://owncloud.org/contribute/agreement/ .

    But ... I am very worried about breaking the compatibility with Ant; I didn't check the changes in Android Studio myelf and can't argue about it, but we need to consider carefully how to get both systems live together. For the moment, any developer should be able to decide whether using one or the other (simultaneous use of both is not needed).

    I'll try to have a look to your work building the library .

  2. MMMarcy commented on Oct 4, 2014

    @MMMarcy
    Contributor

    Hello,

    I am part of the @stoyicker group. We managed to almost port everything to Gradle 2.1. However, we need your input on how to proceed. ActionBarSherlock is no longer maintained. In its latest release (4.4.0) it uses an old version of Gradle not compatible with version 2.x. Therefore there are 2 options.
    The first one is to create a maven dependency since the artifacts are available to maven.org (http://search.maven.org/#search%7Cga%7C1%7Cactionbarsherlock). This will eliminate the need of an additional sub-module and simplify the architecture of the repository. However, the maven building files must be updated.
    The second is to fork actionbarsherlock and make the submodule pointing to the fork

    update
    The maven port is done through a dependency on mavencentral. @davivel we are wondering how important is the Ant compatibility. Especially considering the presence of the gradle.jar and the scripts that allow to build the application on every platform

    Other smaller issues with the porting are

    1. owncloud-android-library still doesn't include gradle support so, for testing purpose, we changed the related submodule to point to our fork Gradle building system android-library#38 . Obiouvsly this need to be changed back to the owncloud own repo when the PR will be merged
    2. Since the introduction of ADT 14 switch statements targeting resource ids are no longer supported. Therefore we follow Google guidelines ( http://tools.android.com/tips/non-constant-fields ) to avoid compilation errors. This will result in a massive pull request. We hope this is still ok.
  3. davivel commented on Oct 9, 2014

    @davivel
    Contributor

    Ant & Eclipse compatibility are both fundamental.

    About ActionBarSherlock, we do not use version 4.4.0, but 4.1.0; the submodule is fixed on the corresponding commit. The reason to decide this was that we did not have resources enough to check possible problems in our build, or still worst, unexpected changes in our UI due to the independent agenda of ActionBarSherlock.

    Indeed, we probably should just replace the submodule with a binary JAR, and that should resolve your problem too.

    Besides, we are evaluating completely removing it from the project, since the Android Support Library includes the ActionBar from some months now.

    About 1, that is completely perfect.

    About 2, seems OK to me.

  4. MMMarcy commented on Oct 9, 2014

    @MMMarcy
    Contributor

    Thanks for the info.

    Then I will add the jar of version 4.1 and remove the sub-module.

  5. stoyicker commented on Oct 15, 2014

    @stoyicker
    ContributorAuthor

    See #656.

  6. davivel commented on Dec 3, 2014

    @davivel
    Contributor

    And this is finally in branch develop thanks to the awesome effort of @stoyicker and @MMMarcy .

    Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions