Debian Codegraph @

tools/tungsten/plugin/build.gradle

raw
1 import java.nio.file.Paths
2
3 buildscript {
4 repositories {
5 mavenCentral()
6 maven {
7 url 'https://plugins.gradle.org/m2/'
8 }
9 maven {
10 url 'http://dl.bintray.com/jetbrains/intellij-plugin-service'
11 }
12 }
13 }
14
15 plugins {
16 id 'org.jetbrains.intellij' version '0.3.5'
17 id 'org.jetbrains.kotlin.jvm' version '1.2.51'
18 }
19
20 apply plugin: 'java'
21
22 // Bundle matc binary and Filament shared library
23 def filament_path = file("../../../dist").absolutePath
24 if (project.hasProperty("filament_dist_dir")) {
25 filament_path = file("$filament_dist_dir").absolutePath
26 }
27
28 // matc binary
29 def matc = ['/bin/matc.exe', '/bin/matc']
30 def matcFullPath = matc.collect { path -> Paths.get(filament_path, path) }
31
32 // Filament shared library
33 def library = ["/lib/x86_64/filament-jni.dll", "/lib/x86_64/libfilament-jni.dylib",
34 "/lib/x86_64/libfilament-jni.so"]
35 def libraryFullPath = library.collect { path -> Paths.get(filament_path, path) }
36
37 // Ensure that at least one matc binary and Filament library is present
38 if (!matcFullPath.any { path -> file(path).exists() }) {
39 throw new StopActionException("No matc binary could be found in " + filament_path +
40 "/bin. Ensure Filament has been built before building Tungsten.")
41 }
42 if (!libraryFullPath.any { path -> file(path).exists() }) {
43 throw new StopActionException("No Filament shared library could be found in " + filament_path +
44 "/lib/x86_64. Ensure Filament has been built before building Tungsten.")
45 }
46
47 processResources {
48 from( matcFullPath, libraryFullPath )
49 }
50
51 sourceCompatibility = 1.8
52
53 repositories {
54 mavenCentral()
55 }
56
57 dependencies {
58 implementation project(':core')
59 }
60
61 intellij {
62 version '2017.1'
63 pluginName 'Tungsten'
64 updateSinceUntilBuild false
65 alternativeIdePath System.getenv('ANDROID_STUDIO')
66
67 dependencies {
68 runtime project(':core')
69 }
70 }
71
72 group 'com.google'
73 version '1.0.0'