googlearchive / android-audio-high-performance

We now recommend you use the Oboe libraries:
https://github.com/google/oboe
Apache License 2.0
720 stars 275 forks source link

Enable building Oboe from the command line #99

Closed gogins closed 6 years ago

gogins commented 6 years ago

In order to more easily enable building from the command line, please add google as a repository to the android-audio-high-performance/oboe/build.gradle file, like this:

 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        google()
    }
}
dturner commented 6 years ago

What does adding the google repository allow you to do from the command line that you can't already do?

dturner commented 6 years ago

Ah I see, executing gradlew from the command line results in the following output:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'oboe'.
> Could not resolve all files for configuration ':classpath'.
   > Could not find com.android.tools.build:gradle:3.0.1.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar
     Required by:
         project :

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

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
gogins commented 6 years ago

Thank you!

On Jan 11, 2018 11:43, "Don Turner" notifications@github.com wrote:

Closed #99 https://github.com/googlesamples/android-audio-high-performance/issues/99 via 2ee8274 https://github.com/googlesamples/android-audio-high-performance/commit/2ee827411e6136851fea707a826573c31064b174 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/googlesamples/android-audio-high-performance/issues/99#event-1420139063, or mute the thread https://github.com/notifications/unsubscribe-auth/AGCDJbBasTL8f6jNwmN5_LBfsHgYMH6Zks5tJjpJgaJpZM4RUzWI .