groovy
dependencies {
compileOnly 'com.google.angular:google-angular-webresources:2.0.0'
}
groovy
apply plugin: 'webresources'
webresources {
configuration {
}
}
}
bash
ng new my-app
groovy
apply plugin: 'biz.aQute.bnd.builder'
bnd {
baselining {
enable = false
}
instructions {
//-...
//-...
}
}
//...
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Reference;
import aQute.bnd.annotation.headers.ProvideCapability;
import angular.core.core.di.annotations.Inject;
import google.angular.core.core.annotations.Component;
@Component
@ProvideCapability(namespace = "osgi.enroute.sample")
public class AppComponent {
@Inject
MyService myService;
//...
}
html
<h1>Hello, World!</h1>
<p>{{ myService.getMessage() }}</p>
groovy
plugins {
id 'biz.aQute.bnd.builder' version '5.4.0'
id 'java'
id 'osgi.enroute.gradle.plugin' version '2.6.1'
}
webresources {
configuration {
angularResources {
resourceSetName = 'angular'
resourceDirectories.add(sourceSets.main.resources.srcDirs.first())
resourceIncludes.add('**/*.js')
}
}
}
groovy
include 'my-app'
project(':my-app').projectDir = new File('src/main/resources/angular/my-app')