OLD | NEW |
1 # Copyright 2015 Google Inc. | 1 # Copyright 2015 Google Inc. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # This GYP file stores the dependencies necessary to build Skia on the Android | 6 # This GYP file stores the dependencies necessary to build Skia on the Android |
7 # platform. The OS doesn't provide many stable libraries as part of the | 7 # platform. The OS doesn't provide many stable libraries as part of the |
8 # distribution so we have to build a few of them ourselves. | 8 # distribution so we have to build a few of them ourselves. |
9 # | 9 # |
10 { | 10 { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 # This also accounts for Release_Developer BUILDTYPE | 44 # This also accounts for Release_Developer BUILDTYPE |
45 'android_buildtype': "Release", | 45 'android_buildtype': "Release", |
46 'android_apk_suffix': "release.apk", | 46 'android_apk_suffix': "release.apk", |
47 }], | 47 }], |
48 ], | 48 ], |
49 }, | 49 }, |
50 'includes' : [ | 50 'includes' : [ |
51 'canvasproof.gypi', | 51 'canvasproof.gypi', |
52 'viewer.gypi', | 52 'viewer.gypi', |
53 ], | 53 ], |
54 'targets': [ | |
55 { | |
56 'target_name': 'CopySampleAppDeps', | |
57 'type': 'none', | |
58 'dependencies': [ | |
59 'skia_lib.gyp:skia_lib', | |
60 'SampleApp.gyp:SampleApp', | |
61 ], | |
62 'copies': [ | |
63 # Copy all shared libraries into the Android app's libs folder. Note | |
64 # that this copy requires us to build SkiaAndroidApp after those | |
65 # libraries, so that they exist by the time it occurs. If there are no | |
66 # libraries to copy, this will cause an error in Make, but the app will | |
67 # still build. | |
68 { | |
69 'destination': '<(android_base)/apps/sample_app/src/main/libs/<(androi
d_arch)', | |
70 'conditions': [ | |
71 [ 'skia_shared_lib', { | |
72 'files': [ | |
73 '<(SHARED_LIB_DIR)/libSampleApp.so', | |
74 '<(SHARED_LIB_DIR)/libskia_android.so', | |
75 ]}, { | |
76 'files': [ | |
77 '<(SHARED_LIB_DIR)/libSampleApp.so', | |
78 ]} | |
79 ], | |
80 ], | |
81 }, | |
82 ], | |
83 }, | |
84 { | |
85 'target_name': 'SampleApp_APK', | |
86 'type': 'none', | |
87 'dependencies': [ | |
88 'CopySampleAppDeps', | |
89 ], | |
90 'actions': [ | |
91 { | |
92 'action_name': 'SampleApp_apk', | |
93 'inputs': [ | |
94 '<(android_base)/apps/sample_app/src/main/AndroidManifest.xml', | |
95 '<(android_base)/apps/sample_app/src/main/jni/com_skia_SkiaSampleRen
derer.h', | |
96 '<(android_base)/apps/sample_app/src/main/jni/com_skia_SkiaSampleRen
derer.cpp', | |
97 '<(android_base)/apps/sample_app/src/main/java/com/skia/SkiaSampleAc
tivity.java', | |
98 '<(android_base)/apps/sample_app/src/main/java/com/skia/SkiaSampleRe
nderer.java', | |
99 '<(android_base)/apps/sample_app/src/main/java/com/skia/SkiaSampleVi
ew.java', | |
100 '<(android_base)/apps/sample_app/src/main/libs/<(android_arch)/libSa
mpleApp.so', | |
101 ], | |
102 'conditions': [ | |
103 [ 'skia_shared_lib', { | |
104 'inputs': [ | |
105 '<(android_base)/apps/sample_app/src/main/libs/<(android_arch)/l
ibskia_android.so', | |
106 ], | |
107 }], | |
108 ], | |
109 'outputs': [ | |
110 '<(android_base)/apps/sample_app/build/outputs/apk/sample_app-<(andr
oid_variant)-<(android_apk_suffix)', | |
111 ], | |
112 'action': [ | |
113 '<(android_base)/apps/gradlew', | |
114 ':sample_app:assemble<(android_variant)<(android_buildtype)', | |
115 '-p<(android_base)/apps/sample_app', | |
116 '-PsuppressNativeBuild', | |
117 ], | |
118 }, | |
119 ], | |
120 }, | |
121 ], | |
122 } | 54 } |
OLD | NEW |