74 lines
1.9 KiB
Groovy
74 lines
1.9 KiB
Groovy
import java.nio.file.Paths
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
url 'https://plugins.gradle.org/m2/'
|
|
}
|
|
maven {
|
|
url 'http://dl.bintray.com/jetbrains/intellij-plugin-service'
|
|
}
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'org.jetbrains.intellij' version '0.3.5'
|
|
id 'org.jetbrains.kotlin.jvm' version '1.2.51'
|
|
}
|
|
|
|
apply plugin: 'java'
|
|
|
|
// Bundle matc binary and Filament shared library
|
|
def filament_path = file("../../../dist").absolutePath
|
|
if (project.hasProperty("filament_dist_dir")) {
|
|
filament_path = file("$filament_dist_dir").absolutePath
|
|
}
|
|
|
|
// matc binary
|
|
def matc = ['/bin/matc.exe', '/bin/matc']
|
|
def matcFullPath = matc.collect { path -> Paths.get(filament_path, path) }
|
|
|
|
// Filament shared library
|
|
def library = ["/lib/x86_64/filament-jni.dll", "/lib/x86_64/libfilament-jni.dylib",
|
|
"/lib/x86_64/libfilament-jni.so"]
|
|
def libraryFullPath = library.collect { path -> Paths.get(filament_path, path) }
|
|
|
|
// Ensure that at least one matc binary and Filament library is present
|
|
if (!matcFullPath.any { path -> file(path).exists() }) {
|
|
throw new StopActionException("No matc binary could be found in " + filament_path +
|
|
"/bin. Ensure Filament has been built before building Tungsten.")
|
|
}
|
|
if (!libraryFullPath.any { path -> file(path).exists() }) {
|
|
throw new StopActionException("No Filament shared library could be found in " + filament_path +
|
|
"/lib/x86_64. Ensure Filament has been built before building Tungsten.")
|
|
}
|
|
|
|
processResources {
|
|
from( matcFullPath, libraryFullPath )
|
|
}
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':core')
|
|
}
|
|
|
|
intellij {
|
|
version '2017.1'
|
|
pluginName 'Tungsten'
|
|
updateSinceUntilBuild false
|
|
alternativeIdePath System.getenv('ANDROID_STUDIO')
|
|
|
|
dependencies {
|
|
runtime project(':core')
|
|
}
|
|
}
|
|
|
|
group 'com.google'
|
|
version '1.0.0'
|