Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3260)

Unified Diff: build/android/gradle/build.gradle.jinja

Issue 2621413002: Android: Split up build.gradle.jinja (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/gradle/android.jinja ('k') | build/android/gradle/dependencies.jinja » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gradle/build.gradle.jinja
diff --git a/build/android/gradle/build.gradle.jinja b/build/android/gradle/build.gradle.jinja
deleted file mode 100644
index 1475cea39ee026926fff0915aec2d8ceca608493..0000000000000000000000000000000000000000
--- a/build/android/gradle/build.gradle.jinja
+++ /dev/null
@@ -1,134 +0,0 @@
-{# Copyright 2016 The Chromium Authors. All rights reserved. #}
-{# Use of this source code is governed by a BSD-style license that can be #}
-{# found in the LICENSE file. #}
-// Generated by //build/android/generate_gradle.py
-{% if template_type == 'root' %}
-
-buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:2.2.3"
- }
-}
-
-{% elif template_type in ('java_library', 'java_binary') %}
-
-apply plugin: "java"
-{% if template_type == 'java_binary' %}
-apply plugin: "application"
-{% endif %}
-
-sourceSets {
- main {
- java.srcDirs = [
-{% for path in java_dirs %}
- "{{ path }}",
-{% endfor %}
- ]
- }
-}
-
-sourceCompatibility = JavaVersion.VERSION_1_7
-targetCompatibility = JavaVersion.VERSION_1_7
-
-{% if template_type == 'java_binary' %}
-mainClassName = "{{ main_class }}"
-applicationName = "{{ target_name }}"
-{% endif %}
-{% if template_type in ('java_binary', 'java_library') %}
-archivesBaseName = "{{ target_name }}"
-{% endif %}
-
-{% else %}
-
-{% if template_type in ('android_library', 'android_junit') %}
-apply plugin: "com.android.library"
-{% elif template_type == 'android_apk' %}
-apply plugin: "com.android.application"
-{% endif %}
-
-android {
- compileSdkVersion {{ compile_sdk_version }}
- buildToolsVersion "{{ build_tools_version }}"
- publishNonDefault true
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
- }
-
- sourceSets {
-{% for name in ['main', 'test', 'androidTest', 'debug', 'release'] %}
- {{ name }} {
- aidl.srcDirs = []
- assets.srcDirs = []
- java.srcDirs = []
- jni.srcDirs = []
- renderscript.srcDirs = []
- res.srcDirs = []
- resources.srcDirs = []
- }
-{% endfor %}
-
- main.manifest.srcFile "{{ android_manifest }}"
-
- {{ sourceSetName }} {
- java.srcDirs = [
-{% for path in java_dirs %}
- "{{ path }}",
-{% endfor %}
- ]
- jniLibs.srcDirs = [
-{% for path in jni_libs %}
- "{{ path }}",
-{% endfor %}
- ]
- }
- }
-}
-
-{% endif %}
-{% if template_type != 'root' %}
-
-dependencies {
-{% for path in prebuilts %}
- {{ depCompileName }} files("{{ path }}")
-{% endfor %}
-{% for proj in java_project_deps %}
- {{ depCompileName }} project(":{{ proj }}")
-{% endfor %}
-{% for proj in android_project_deps %}
- {{ depCompileName }} project(path: ":{{ proj }}", configuration: "debug")
-{% endfor %}
-}
-
-{% if template_type.startswith('android') %}
-android.variantFilter { variant ->
- if (variant.buildType.name.equals('release')) {
- variant.setIgnore(true);
- }
-}
-
-afterEvaluate {
- def tasksToDisable = tasks.findAll {
- return (it.name.equals('generateDebugSources') // causes unwanted AndroidManifest.java
- || it.name.equals('generateReleaseSources')
- || it.name.endsWith('Assets')
- || it.name.endsWith('BuildConfig') // causes unwanted BuildConfig.java
-{% if not use_gradle_process_resources %}
- || it.name.endsWith('Resources')
- || it.name.endsWith('ResValues')
-{% endif %}
- || it.name.endsWith('Aidl')
- || it.name.endsWith('Renderscript')
- || it.name.endsWith('Shaders'))
- }
- tasksToDisable.each { Task task ->
- task.enabled = false
- }
-}
-
-{% endif %}
-{% endif %}
« no previous file with comments | « build/android/gradle/android.jinja ('k') | build/android/gradle/dependencies.jinja » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698