mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-08 20:12:39 +01:00
Test install task
This commit is contained in:
parent
16e575ee54
commit
93d2d28af6
@ -5,6 +5,7 @@ apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'com.getkeepsafe.dexcount'
|
||||
apply plugin: 'com.gladed.androidgitversion'
|
||||
apply plugin: FrostPlugin
|
||||
|
||||
apply from: '../spotless.gradle'
|
||||
group = APP_GROUP
|
||||
|
@ -22,6 +22,15 @@ val kau = rootProps.useLines {
|
||||
|
||||
println("Using kau $kau")
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
register("frost-web-gen") {
|
||||
id = "frost"
|
||||
implementationClass = "FrostPlugin"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("ca.allanwang.kau:gradle-plugin:$kau")
|
||||
implementation("com.moowork.gradle:gradle-node-plugin:1.3.1")
|
||||
|
@ -12,6 +12,7 @@ class FrostPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
override fun apply(project: Project) {
|
||||
println("Applying Frost Plugin")
|
||||
project.plugins.withId("java-base") {
|
||||
project.applyWebGenPlugin()
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import com.moowork.gradle.node.npm.NpmTask
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.logging.LogLevel
|
||||
import org.gradle.api.tasks.CacheableTask
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.OutputFile
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
@ -9,7 +10,8 @@ import java.io.File
|
||||
/**
|
||||
* Based on https://github.com/apollographql/apollo-android/blob/master/apollo-gradle-plugin/src/main/groovy/com/apollographql/apollo/gradle/ApolloCodegenInstallTask.groovy
|
||||
*/
|
||||
class WebGenInstallTask : DefaultTask() {
|
||||
@CacheableTask
|
||||
open class WebGenInstallTask : DefaultTask() {
|
||||
|
||||
companion object {
|
||||
const val TAG = "frost-web-gen"
|
||||
@ -34,7 +36,6 @@ class WebGenInstallTask : DefaultTask() {
|
||||
|
||||
installDir.set(project.file(File(project.buildDir, INSTALLATION_PATH)))
|
||||
packageFile.set(project.file(File(project.buildDir, PACKAGE_FILE_PATH)))
|
||||
|
||||
npmTask.setWorkingDir(File(project.buildDir, TAG))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user