# Cannot compile build script on Mac

**URL:** <https://discuss.gradle.org/t/cannot-compile-build-script-on-mac/1924>\
**Category:** Old Forum Archive\
**Created:** [February 16, 2014, 2:24am UTC](https://discuss.gradle.org/t/cannot-compile-build-script-on-mac/1924 "2014-02-16T02:24:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Calfo](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/frank_calfo/32/483_2.png) [@Frank\_Calfo](https://discuss.gradle.org/u/Frank_Calfo)\
**Post date:** [February 16, 2014, 2:24am UTC](https://discuss.gradle.org/t/cannot-compile-build-script-on-mac/1924/1 "2014-02-16T02:24:00Z")

</div>

I’m trying to run Gradle 1.1.1 on Mac OS X 10.9.1 but cannot get a simple build script to compile

Here’s the output from gradle -v

------------------------------------------------------------ Gradle 1.11 ------------------------------------------------------------

Build time:

2014-02-11 11:34:39 UTC Build number: none Revision:

a831fa866d46cbee94e61a09af15f9dd95987421

Groovy:

1.8.6 Ant:

Apache Ant™ version 1.9.2 compiled on July 8 2013 Ivy:

2.2.0 JVM:

1.7.0\_45 (Oracle Corporation 24.45-b08) OS:

Mac OS X 10.9.1 x86\_64

Here’s my build script:

```gradle
apply plugin: 'java'
  sourceCompatibility = 1.7
  repositories {
   mavenCentral()
}
  dependencies {
  testCompile ‘org.testng:testng:6.8.7’
}

```

When I run “gradle” from the command line I get this error:

FAILURE: Build failed with an exception.

- Where: Build file ‘/Users/frank/Documents/work/mockprogression/build.gradle’ line: 10

- What went wrong: Could not compile build file ‘/Users/frank/Documents/work/mockprogression/build.gradle’. \> startup failed:

build file ‘/Users/frank/Documents/work/mockprogression/build.gradle’: 10: expecting ‘}’, found ‘:’ @ line 10, column 26.

testCompile ‘org.testng:testng:6.8.7’

^

1 error

It looks like I’m using the correct syntax.

Why is gradle complaining about this build script ?

---

<div class="post-metadata">

**Author:** ![bmuschko](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/bmuschko/32/5458_2.png) [@bmuschko](https://discuss.gradle.org/u/bmuschko)\
**Post date:** [February 16, 2014, 2:31am UTC](https://discuss.gradle.org/t/cannot-compile-build-script-on-mac/1924/2 "2014-02-16T02:31:00Z")

</div>

For your dependency declaration you are not using single or double quotes. Make sure you use the correct character.

```gradle
dependencies {
    testCompile 'org.testng:testng:6.8.7'
}

```

---

<div class="post-metadata">

**Author:** ![Frank\_Calfo](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/frank_calfo/32/483_2.png) [@Frank\_Calfo](https://discuss.gradle.org/u/Frank_Calfo)\
**Post date:** [February 17, 2014, 9:30am UTC](https://discuss.gradle.org/t/cannot-compile-build-script-on-mac/1924/3 "2014-02-17T09:30:00Z")

</div>

Thanks for the suggestion but I still get the same problem after switching to double quotes

Seems like some sort of platform issue with Mac?

I’m just using the built in TextEdit from Mac OSX 10.9.1

```gradle
apply plugin: “java”
  sourceCompatibility = 1.7
  repositories {
   mavenCentral()
}
  dependencies {
  testCompile “org.testng:testng:6.8.7”
}

```

Franks-MacBook-Pro:mockprogression frank$ gradle build

FAILURE: Build failed with an exception.

- Where: Build file ‘/Users/frank/Documents/work/mockprogression/build.gradle’ line: 10

- What went wrong: Could not compile build file ‘/Users/frank/Documents/work/mockprogression/build.gradle’. \> startup failed:

build file ‘/Users/frank/Documents/work/mockprogression/build.gradle’: 10: expecting ‘}’, found ‘:’ @ line 10, column 26.

testCompile “org.testng:testng:6.8.7”

^

1 error

- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.998 secs Franks-MacBook-Pro:mockprogression frank$

---

<div class="post-metadata">

**Author:** ![Lance](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/lance/32/787_2.png) [@Lance](https://discuss.gradle.org/u/Lance)\
**Post date:** [February 17, 2014, 9:41am UTC](https://discuss.gradle.org/t/cannot-compile-build-script-on-mac/1924/4 "2014-02-17T09:41:00Z")

</div>

I think TextEdit is using curly quotes instead of straight quotes [http://practicaltypography.com/straight-and-curly-quotes.html](http://practicaltypography.com/straight-and-curly-quotes.html) (ie you are using “ instead of " and ‘ instead of ')

You might need to switch to a proper code editor

---

<div class="post-metadata">

**Author:** ![David\_Levy](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@David\_Levy](https://discuss.gradle.org/u/David_Levy)\
**Post date:** [April 24, 2014, 8:54pm UTC](https://discuss.gradle.org/t/cannot-compile-build-script-on-mac/1924/5 "2014-04-24T20:54:00Z")

</div>

TextWrangler is free to download and seems to work better
