1 /*
2 * Copyright 2017-2022 original authors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package io.micronaut.build;
17
18 /**
19 * The packaging kind of the application.
20 *
21 * @author graemerocher
22 * @author Álvaro Sánchez-Mariscal
23 * @since 1.1
24 */
25 public enum MicronautRuntime {
26
27 /**
28 * No specific runtime specified.
29 */
30 NONE(),
31
32 /**
33 * Default packaging.
34 */
35 NETTY(),
36
37 /**
38 * Tomcat server.
39 */
40 TOMCAT(),
41
42 /**
43 * Jetty server.
44 */
45 JETTY(),
46
47 /**
48 * Undertow server.
49 */
50 UNDERTOW(),
51
52 /**
53 * AWS lambda packaged as a Jar file.
54 */
55 LAMBDA(DockerBuildStrategy.LAMBDA),
56
57 /**
58 * Oracle Cloud Function, packaged as a docker container.
59 */
60 ORACLE_FUNCTION(DockerBuildStrategy.ORACLE_FUNCTION),
61
62 /**
63 * Google Cloud Function, packaged as a Fat JAR.
64 */
65 GOOGLE_FUNCTION(),
66
67 /**
68 * Azure Cloud Function.
69 */
70 AZURE_FUNCTION();
71
72 public static final String PROPERTY = "micronaut.runtime";
73
74 private final DockerBuildStrategy buildStrategy;
75
76 MicronautRuntime() {
77 this.buildStrategy = DockerBuildStrategy.DEFAULT;
78 }
79
80 MicronautRuntime(DockerBuildStrategy buildStrategy) {
81 this.buildStrategy = buildStrategy;
82 }
83
84 /**
85 * @return The docker build strategy
86 */
87 public DockerBuildStrategy getBuildStrategy() {
88 return buildStrategy;
89 }
90
91 }