com.android.build.gradle.tasks.NdkCompile.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-core Show documentation
Show all versions of gradle-core Show documentation
Amazon Core library to build Android Gradle plugin.
The newest version!
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* 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.
*/
package com.android.build.gradle.tasks
import com.android.annotations.NonNull
import com.android.build.gradle.internal.dsl.CoreNdkOptions
import com.android.build.gradle.internal.tasks.NdkTask
import com.android.ide.common.process.ProcessInfoBuilder
import com.android.sdklib.IAndroidTarget
import com.google.common.base.Charsets
import com.google.common.base.Joiner
import com.google.common.collect.Lists
import com.google.common.io.Files
import org.gradle.api.GradleException
import org.gradle.api.file.FileTree
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.SkipWhenEmpty
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.incremental.IncrementalTaskInputs
import org.gradle.api.tasks.util.PatternSet
import static com.android.SdkConstants.CURRENT_PLATFORM
import static com.android.SdkConstants.PLATFORM_WINDOWS
class NdkCompile extends NdkTask {
public static String USE_DEPRECATED_NDK = "android.useDeprecatedNdk";
List sourceFolders
@OutputFile
File generatedMakefile
@Input
boolean debuggable
@OutputDirectory
File soFolder
@OutputDirectory
File objFolder
@Optional
@Input
File ndkDirectory
@Input
boolean ndkRenderScriptMode
@Input
boolean ndkCygwinMode
@Input
boolean isForTesting
@SkipWhenEmpty
@InputFiles
FileTree getSource() {
FileTree src = null
List sources = getSourceFolders()
if (!sources.isEmpty()) {
src = getProject().files(new ArrayList