@Retention(CLASS) @Target({TYPE})
public @interface Build
Build hints that are not specific to one platform.
Place this on your application’s main class – the class named by
codename1.mainName. An attribute you do not set is not written at all, so
the build server’s own default applies. The default clause below each
attribute names a constant that says nothing – see HintUnset – and this
package deliberately does not record what the server would do instead,
because that is the server’s to change.
Methods
public abstract String facebookAppId() default "" | The application ID for an app that requires native Facebook login integration, this defaults to null which means native Facebook support shouldn’t be in the app |
public abstract String gcmSenderId() default "" | The Android/chrome push identifier, see the push section for more details |
public abstract ThemeMode nativeTheme() default ThemeMode.DEFAULT | native, modern, legacy, custom (default unset). |
public abstract Toggle noExtraResources() default Toggle.DEFAULT | true/false (defaults to false). |
Method details
facebookAppId
public abstract String facebookAppId() default ""gcmSenderId
public abstract String gcmSenderId() default ""nativeTheme
public abstract ThemeMode nativeTheme() default ThemeMode.DEFAULTnative, modern, legacy, custom (default unset). Cross-platform
override that sets ios.themeMode and and.themeMode together when those
aren’t set explicitly. modern = liquid glass + Material 3, legacy =
iOS 7 flat + Holo Light, custom disables the framework native theme
entirely. The legacy alias cn1.nativeTheme is still accepted.
native is modern plus the desktop: it additionally selects the host’s
own desktop theme – Fluent, Aqua or Adwaita – the way
desktop.themeMode = auto does. modern stops short of the desktop on
purpose, because it predates the desktop themes by years and an application
that set it for its phone builds never asked for its desktop screens to be
redrawn.
desktop.themeMode overrides this hint either way, and the full per-platform
table is on the @DesktopBuild annotation.
noExtraResources
public abstract Toggle noExtraResources() default Toggle.DEFAULT