Android Export Settings provide a way to customize the export to your liking. We realize that every developer is different (we are developers after all), so the list is quite extensive! You'll find the list of settings with the explanation of every option below.
Project structure defines a type of generated bundle. The following options are available:
Project- Exported code is created as a standalone project and can be used as such.
Module- Exported code is created as a module that can be further embedded into projects. Modules alone can't be used to run the app and always need a shell project to be present.
Package structure defines how the exported artifacts are separated into folders. The following options are available:
Grouped- Implementation files are exported into separate packages, such as
fragmentand so on.
Flat- Implementation files are exported into one single folder.
Keep in mind that the folder structure only affects implementation files. Other artifacts, such as fonts, assets, configuration files and so on are always put into their respective folders.
Keeping code in sync
Using the module project type option is the preferred way to keep your code in sync with Supernova, since modules can just be replaced 1:1 without much hassle.
The indentation character used for proper spacing of generated code. Available options are
Indent Character Count
The number of indentation characters per one indent level - for example, if there is a method inside a class, the method will be indented with 1*n indent characters, but any code inside it will be indented with at last 2*n indent characters (e.g. - 4, 8 spaces or 1, 2 tabs).
Specifies how the brace behavior works. The following options are available:
Same Line- Opening braces start on the same line, indented by one space.
New Line- Opening braces start on a new line, following indentation rules set above.
When enabled, Supernova generates comments for the code where appropriate. The comments are not intrusive and are usually only placed where they really have some value.
Generate Beginner Comments
When enabled, Supernova generates additional comments to explain what is done. This can result in a large number of comments but is great for understanding of the code.
Spacing (before / after) (code structure)
The number of empty lines before every specific code structure.
Empty lines at the end of the file
The number of empty lines after the last line of code in the file. Some IDEs don't allow for extraneous padding at the end of the edited file so this option is a good workaround for it.
Defines the header block that is added to the beginning of every generated code file. By default, the header looks like this:
/* * _filename_ * _projectname_ * * Created by _authorname_. * Copyright © 2019 _companyname_. All rights reserved. */
You can use
_companyname_ tags to further enhance your headers with additional dynamic information (will be replaced when exporting).
Class name suffixes
When exporting, Supernova uses a smart naming engine to keep everything as unified as possible. You can select how the replacement of class names should look like - for example, if your activity is named
Onboarding Flow, the output name will be by default exported as
OnboardingFlowActivity. However with these settings, you can change it so the output will look like
Activity or even something completely custom like
Overriding class names
You can override the exported screen class name completely, in which case those rules are not applied - select the screen you'd like to rename and write your desired name in the
screen classproperty in the code section on the right panel.
Property name suffixes
When exporting, Supernova uses a smart naming engine to keep everything as unified as possible. you can select how the replacement of property names should look like - for example, if your component is named
Header, the output name will be by default exported as
headerConstraintLayout. However, with these settings, you can change it so the output will look like
header or even something custom like
Overriding property names
You can override the exported property name completely, in which case those rules are not applied - select the component you'd like to rename and write your desired name in the
property nameproperty in the code section on the right panel.
Updated almost 3 years ago