# Travis CI can't find our Gradle file

**URL:** <https://travis-ci.community/t/travis-ci-cant-find-our-gradle-file/14130>\
**Category:** Deployment\
**Created:** [December 28, 2023, 5:22am UTC](https://travis-ci.community/t/travis-ci-cant-find-our-gradle-file/14130 "2023-12-28T05:22:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mearsheimer](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/mearsheimer/32/9077_2.png) [@Mearsheimer](https://travis-ci.community/u/Mearsheimer)\
**Post date:** [December 28, 2023, 5:22am UTC](https://travis-ci.community/t/travis-ci-cant-find-our-gradle-file/14130/1 "2023-12-28T05:22:07Z")

</div>

My current `.travis.yml` (at least the part of it that matters:)

```yaml
before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
  directories:
  - $HOME/.gradle/caches/
  - $HOME/.gradle/wrapper/
  - $HOME/.android/build-cache

```

Screenshot:

 ![](https://us1.discourse-cdn.com/flex015/uploads/travis_ci/original/2X/3/351b47f43567688935d00791ab960bd49e2c60dd.png)  
Thanks,  
Jon Mearsheimer.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [December 28, 2023, 5:25am UTC](https://travis-ci.community/t/travis-ci-cant-find-our-gradle-file/14130/2 "2023-12-28T05:25:06Z")

</div>

Hi @Mearsheimer,

```yaml
before_script:
  - cd ${TRAVIS_BUILD_DIR}/WhateverItIs
  - chmod +x ./gradlew

script: "./gradlew assemble"

```

This is how your `before_script` should look like. Then I added an example of the `script` hook.
