From 03c5e39a36e226cdfa4d9f803e0ff81baae3542e Mon Sep 17 00:00:00 2001 From: Eppleton IT Date: Fri, 15 Mar 2019 20:23:42 +0100 Subject: [PATCH] Defining the project archetype in a layer --- groovy/gradle.htmlui/manifest.mf | 1 + groovy/gradle.htmlui/nbproject/project.xml | 3 +- .../gradle/htmlui/GradleArchetype.java | 55 ++++++++++++++++ .../gradle/htmlui/resources/app_build.gradle | 55 ++++++++++++++++ .../app_src_main_AndroidManifest.xml | 22 +++++++ .../htmlui/resources/desktop_build.gradle | 23 +++++++ .../desktop_src_main_java_DesktopMain.fmk | 35 +++++++++++ .../gradle/htmlui/resources/gradle.properties | 9 +++ .../modules/gradle/htmlui/resources/layer.xml | 57 +++++++++++++++++ .../gradle/htmlui/resources/root_build.gradle | 24 +++++++ .../gradle/htmlui/resources/settings.gradle | 5 ++ .../htmlui/resources/src_main_java_Demo.fmk | 63 +++++++++++++++++++ .../resources/src_main_webapp_pages_index.css | 0 .../src_main_webapp_pages_index.html | 48 ++++++++++++++ .../gradle/htmlui/resources/web_build.gradle | 29 +++++++++ .../web_src_main_java_BrowserMain.fmk | 30 +++++++++ .../gradle/htmlui/CreateArchetypeTest.java | 55 ++++++++++++++++ 17 files changed, 513 insertions(+), 1 deletion(-) create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/GradleArchetype.java create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/app_build.gradle create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/app_src_main_AndroidManifest.xml create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/desktop_build.gradle create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/desktop_src_main_java_DesktopMain.fmk create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/gradle.properties create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/layer.xml create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/root_build.gradle create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/settings.gradle create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_java_Demo.fmk create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_webapp_pages_index.css create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_webapp_pages_index.html create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/web_build.gradle create mode 100644 groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/web_src_main_java_BrowserMain.fmk create mode 100644 groovy/gradle.htmlui/test/unit/src/org/netbeans/modules/gradle/htmlui/CreateArchetypeTest.java diff --git a/groovy/gradle.htmlui/manifest.mf b/groovy/gradle.htmlui/manifest.mf index f99d667ad7f2..64f00a467d2b 100644 --- a/groovy/gradle.htmlui/manifest.mf +++ b/groovy/gradle.htmlui/manifest.mf @@ -1,6 +1,7 @@ Manifest-Version: 1.0 AutoUpdate-Show-In-Client: true OpenIDE-Module: org.netbeans.modules.gradle.htmlui +OpenIDE-Module-Layer: org/netbeans/modules/gradle/htmlui/resources/layer.xml OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/gradle/htmlui/Bundle.properties OpenIDE-Module-Recommends: org.netbeans.modules.debugger.jpda.ui OpenIDE-Module-Specification-Version: 1.0 diff --git a/groovy/gradle.htmlui/nbproject/project.xml b/groovy/gradle.htmlui/nbproject/project.xml index 86459032a21e..b5360b71ce2d 100644 --- a/groovy/gradle.htmlui/nbproject/project.xml +++ b/groovy/gradle.htmlui/nbproject/project.xml @@ -75,8 +75,9 @@ unit - org.netbeans.libs.junit4 + org.netbeans.modules.nbjunit + diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/GradleArchetype.java b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/GradleArchetype.java new file mode 100644 index 000000000000..c76e9bad4a6e --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/GradleArchetype.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.gradle.htmlui; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Enumeration; +import org.openide.filesystems.FileObject; +import org.openide.filesystems.FileUtil; + +final class GradleArchetype { + private final FileObject root; + private final FileObject projectDir; + + GradleArchetype(FileObject root, FileObject projectDir) { + this.root = root; + this.projectDir = projectDir; + } + + final void copyTemplates() throws IOException { + Enumeration en = root.getChildren(true); + while (en.hasMoreElements()) { + FileObject template = en.nextElement(); + if (!template.isData()) { + continue; + } + String relative = FileUtil.getRelativePath(root, template); + FileObject destination = FileUtil.createData(projectDir, relative); + try ( + OutputStream os = destination.getOutputStream(); + InputStream is = template.getInputStream() + ) { + FileUtil.copy(is, os); + } + } + } + +} diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/app_build.gradle b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/app_build.gradle new file mode 100644 index 000000000000..4f52f54f9cc4 --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/app_build.gradle @@ -0,0 +1,55 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath "com.android.tools.build:gradle:2.3.0" + } +} + +def localProperties = new File(project.rootDir, "local.properties") +if (System.getenv("ANDROID_HOME") == null && !localProperties.exists()) { + return; +} + +apply plugin: "com.android.application" + +def commonProject = project.parent + +dependencies { + compile commonProject + compile "com.dukescript.presenters:android:1.5.1" + compile "org.netbeans.html:ko4j:1.6" +} + +android { + compileSdkVersion 23 + buildToolsVersion "25.0.3" + sourceSets { + main.assets.srcDirs += "${commonProject.projectDir}/src/main/webapp" + println("after android" + main.assets.srcDirs); + } + defaultConfig { + applicationId "com.kt.mvvm.demo" + minSdkVersion 16 + targetSdkVersion 16 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + lintOptions { + abortOnError false + } + packagingOptions { + exclude 'META-INF/NOTICE' + exclude 'META-INF/LICENSE' + exclude 'META-INF/DEPENDENCIES' + exclude 'META-INF/DISCLAIMER' + } +} diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/app_src_main_AndroidManifest.xml b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/app_src_main_AndroidManifest.xml new file mode 100644 index 000000000000..ba04d1cfe51d --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/app_src_main_AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/desktop_build.gradle b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/desktop_build.gradle new file mode 100644 index 000000000000..ee26bb4738bb --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/desktop_build.gradle @@ -0,0 +1,23 @@ + +apply plugin: 'java' +apply plugin: 'application' + +def commonProject = project.parent + +mainClassName = 'com.kt.mvvm.demo.DesktopMain' +distributions { + main { + baseName = commonProject.name + '-desktop' + contents { + from "${commonProject.projectDir}/src/main/webapp/" + } + } +} +tasks.run { + jvmArgs "-Dbrowser.rootdir=${commonProject.projectDir}/src/main/webapp/" +} +dependencies { + compile commonProject + compile "org.netbeans.html:net.java.html.boot:1.6" + runtime "org.netbeans.html:net.java.html.boot.fx:1.6" +} diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/desktop_src_main_java_DesktopMain.fmk b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/desktop_src_main_java_DesktopMain.fmk new file mode 100644 index 000000000000..c0e506fff2ef --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/desktop_src_main_java_DesktopMain.fmk @@ -0,0 +1,35 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2017 Anton Epple + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package com.kt.mvvm.demo; + +import net.java.html.boot.BrowserBuilder; + +class desktop_src_main_java_DesktopMain { + public static void main(String[] args) { + BrowserBuilder.newBrowser().loadPage("pages/index.html") + .loadFinished(Demo::onPageLoad) + .showAndWait(); + System.exit(0); + } +} diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/gradle.properties b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/gradle.properties new file mode 100644 index 000000000000..f02676d948a2 --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/gradle.properties @@ -0,0 +1,9 @@ +action.run.args=bck2brwsrShow +action.run.reload.rule=NEVER + +action.debug.args=run --debug-jvm +action.debug.reload.rule=NEVER + +action.custom-1=Run in Browser +action.custom-1.args=bck2brwsrShow +action.custom-1.reload.rule=NEVER diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/layer.xml b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/layer.xml new file mode 100644 index 000000000000..d8b12cb7dabd --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/layer.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/root_build.gradle b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/root_build.gradle new file mode 100644 index 000000000000..ac7ff70f853f --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/root_build.gradle @@ -0,0 +1,24 @@ +plugins { + id "me.tatarka.retrolambda" version "3.7.0" +} + +apply plugin: 'java' + +group 'com.dukescript.demo' +version '1.0-SNAPSHOT' + +allprojects { + repositories { + mavenCentral() + } +} + +targetCompatibility = '1.8' +sourceCompatibility = '1.8' + +dependencies { + compile "org.netbeans.html:net.java.html.json:1.6" + compile "com.dukescript.api:javafx.base:8.60.11" + compile "com.dukescript.api:javafx.beaninfo:0.5" + runtime "org.netbeans.html:ko4j:1.6" +} diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/settings.gradle b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/settings.gradle new file mode 100644 index 000000000000..cd2cd710646a --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/settings.gradle @@ -0,0 +1,5 @@ +include 'desktop' +include 'app' +include 'web' +include 'ios' + diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_java_Demo.fmk b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_java_Demo.fmk new file mode 100644 index 000000000000..5c1ba9444b12 --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_java_Demo.fmk @@ -0,0 +1,63 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2017 Anton Epple + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package com.kt.mvvm.demo; + +import com.dukescript.api.javafx.beans.FXBeanInfo; +import javafx.beans.binding.Bindings; +import javafx.beans.binding.IntegerBinding; +import javafx.beans.property.ListProperty; +import javafx.beans.property.SimpleListProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; +import javafx.collections.FXCollections; +import static net.java.html.json.Models.applyBindings; + +public final class src_main_java_Demo implements FXBeanInfo.Provider { + private final StringProperty desc = new SimpleStringProperty(this, "desc", "Buy Milk"); + private final ListProperty todos = new SimpleListProperty<>(this, "todos", FXCollections.observableArrayList()); + private final IntegerBinding numTodos = Bindings.createIntegerBinding(todos::size, todos); + + void addTodo() { + todos.getValue().add(desc.getValue()); + desc.setValue(""); + } + + private final FXBeanInfo info = FXBeanInfo.newBuilder(this) + .property(desc) + .property(todos) + .property("numTodos", numTodos) + .action("addTodo", this::addTodo) + .build(); + + @Override + public FXBeanInfo getFXBeanInfo() { + return info; + } + + public static void onPageLoad() { + src_main_java_Demo model = new src_main_java_Demo(); + applyBindings(model); + } + +} \ No newline at end of file diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_webapp_pages_index.css b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_webapp_pages_index.css new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_webapp_pages_index.html b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_webapp_pages_index.html new file mode 100644 index 000000000000..ff6c32836f4d --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/src_main_webapp_pages_index.html @@ -0,0 +1,48 @@ + + + + + + + + +

Your Todos ()

+ + + +
    +
  • + +
  • +
+ + + + + + + diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/web_build.gradle b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/web_build.gradle new file mode 100644 index 000000000000..1ad1253a937a --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/web_build.gradle @@ -0,0 +1,29 @@ +buildscript { + ext.bck2brwsr_version = '0.30' + + repositories { + mavenCentral() + } + dependencies { + classpath "org.apidesign.bck2brwsr:bck2brwsr-maven-plugin:$bck2brwsr_version" + } +} + +apply plugin: 'java' +apply plugin: 'bck2brwsr' + +mainClassName = 'com.kt.mvvm.demo.BrowserMain' + +def commonProject = project.parent + +dependencies { + compile commonProject +} + +configurations.bck2brwsr { + exclude group: 'org.jetbrains', module: 'annotations' +} + +bck2brwsrPages.from { + fileTree("${commonProject.projectDir}/src/main/webapp/pages") +} diff --git a/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/web_src_main_java_BrowserMain.fmk b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/web_src_main_java_BrowserMain.fmk new file mode 100644 index 000000000000..23e132977ab4 --- /dev/null +++ b/groovy/gradle.htmlui/src/org/netbeans/modules/gradle/htmlui/resources/web_src_main_java_BrowserMain.fmk @@ -0,0 +1,30 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2017 Anton Epple + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package com.kt.mvvm.demo; + +class web_src_main_java_BrowserMain { + public static void main(String... args) { + Demo.onPageLoad(); + } +} diff --git a/groovy/gradle.htmlui/test/unit/src/org/netbeans/modules/gradle/htmlui/CreateArchetypeTest.java b/groovy/gradle.htmlui/test/unit/src/org/netbeans/modules/gradle/htmlui/CreateArchetypeTest.java new file mode 100644 index 000000000000..3b4643468a68 --- /dev/null +++ b/groovy/gradle.htmlui/test/unit/src/org/netbeans/modules/gradle/htmlui/CreateArchetypeTest.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.gradle.htmlui; + +import org.netbeans.junit.NbTestCase; +import org.openide.filesystems.FileObject; +import org.openide.filesystems.FileUtil; +import org.openide.filesystems.LocalFileSystem; + +public class CreateArchetypeTest extends NbTestCase { + + private FileObject workFo; + + public CreateArchetypeTest(String name) { + super(name); + } + + @Override + protected void setUp() throws Exception { + clearWorkDir(); + LocalFileSystem lfs = new LocalFileSystem(); + lfs.setRootDirectory(getWorkDir()); + workFo = lfs.getRoot(); + } + + + + public void testCreateFromArchetype() throws Exception { + FileObject dir = FileUtil.getConfigFile("Templates/Project/Gradle/org-netbeans-modules-gradle-htmlui-HtmlJavaApplicationProjectWizard.dir"); + assertNotNull("Templates directory found", dir); + + FileObject dest = FileUtil.createFolder(workFo, "sample/dest"); + + GradleArchetype ga = new GradleArchetype(dir, dest); + ga.copyTemplates(); + + assertNotNull("Build script found", dir.getFileObject("build.gradle")); + } +}