gitlab.science.ru.nl/irma/gomobile.git@v0.0.0-20200320223732-da812b634d1f/cmd/gomobile/doc.go (about)

     1  // Copyright 2015 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated by 'gomobile help documentation doc.go'. DO NOT EDIT.
     6  
     7  /*
     8  Gomobile is a tool for building and running mobile apps written in Go.
     9  
    10  To install:
    11  
    12  	$ go get golang.org/x/mobile/cmd/gomobile
    13  	$ gomobile init
    14  
    15  At least Go 1.10 is required.
    16  For detailed instructions, see https://golang.org/wiki/Mobile.
    17  
    18  Usage:
    19  
    20  	gomobile command [arguments]
    21  
    22  Commands:
    23  
    24  	bind        build a library for Android and iOS
    25  	build       compile android APK and iOS app
    26  	clean       remove object files and cached gomobile files
    27  	init        build OpenAL for Android
    28  	install     compile android APK and install on device
    29  	version     print version
    30  
    31  Use 'gomobile help [command]' for more information about that command.
    32  
    33  
    34  Build a library for Android and iOS
    35  
    36  Usage:
    37  
    38  	gomobile bind [-target android|ios] [-bootclasspath <path>] [-classpath <path>] [-o output] [build flags] [package]
    39  
    40  Bind generates language bindings for the package named by the import
    41  path, and compiles a library for the named target system.
    42  
    43  The -target flag takes a target system name, either android (the
    44  default) or ios.
    45  
    46  For -target android, the bind command produces an AAR (Android ARchive)
    47  file that archives the precompiled Java API stub classes, the compiled
    48  shared libraries, and all asset files in the /assets subdirectory under
    49  the package directory. The output is named '<package_name>.aar' by
    50  default. This AAR file is commonly used for binary distribution of an
    51  Android library project and most Android IDEs support AAR import. For
    52  example, in Android Studio (1.2+), an AAR file can be imported using
    53  the module import wizard (File > New > New Module > Import .JAR or
    54  .AAR package), and setting it as a new dependency
    55  (File > Project Structure > Dependencies).  This requires 'javac'
    56  (version 1.7+) and Android SDK (API level 15 or newer) to build the
    57  library for Android. The environment variable ANDROID_HOME must be set
    58  to the path to Android SDK. Use the -javapkg flag to specify the Java
    59  package prefix for the generated classes.
    60  
    61  By default, -target=android builds shared libraries for all supported
    62  instruction sets (arm, arm64, 386, amd64). A subset of instruction sets
    63  can be selected by specifying target type with the architecture name. E.g.,
    64  -target=android/arm,android/386.
    65  
    66  For -target ios, gomobile must be run on an OS X machine with Xcode
    67  installed. The generated Objective-C types can be prefixed with the -prefix
    68  flag.
    69  
    70  For -target android, the -bootclasspath and -classpath flags are used to
    71  control the bootstrap classpath and the classpath for Go wrappers to Java
    72  classes.
    73  
    74  The -v flag provides verbose output, including the list of packages built.
    75  
    76  The build flags -a, -n, -x, -gcflags, -ldflags, -tags, -trimpath, and -work
    77  are shared with the build command. For documentation, see 'go help build'.
    78  
    79  
    80  Compile android APK and iOS app
    81  
    82  Usage:
    83  
    84  	gomobile build [-target android|ios] [-o output] [-bundleid bundleID] [build flags] [package]
    85  
    86  Build compiles and encodes the app named by the import path.
    87  
    88  The named package must define a main function.
    89  
    90  The -target flag takes a target system name, either android (the
    91  default) or ios.
    92  
    93  For -target android, if an AndroidManifest.xml is defined in the
    94  package directory, it is added to the APK output. Otherwise, a default
    95  manifest is generated. By default, this builds a fat APK for all supported
    96  instruction sets (arm, 386, amd64, arm64). A subset of instruction sets can
    97  be selected by specifying target type with the architecture name. E.g.
    98  -target=android/arm,android/386.
    99  
   100  For -target ios, gomobile must be run on an OS X machine with Xcode
   101  installed.
   102  
   103  If the package directory contains an assets subdirectory, its contents
   104  are copied into the output.
   105  
   106  Flag -iosversion sets the minimal version of the iOS SDK to compile against.
   107  The default version is 7.0.
   108  
   109  Flag -androidapi sets the Android API version to compile against.
   110  The default and minimum is 15.
   111  
   112  The -bundleid flag is required for -target ios and sets the bundle ID to use
   113  with the app.
   114  
   115  The -o flag specifies the output file name. If not specified, the
   116  output file name depends on the package built.
   117  
   118  The -v flag provides verbose output, including the list of packages built.
   119  
   120  The build flags -a, -i, -n, -x, -gcflags, -ldflags, -tags, -trimpath, and -work are
   121  shared with the build command. For documentation, see 'go help build'.
   122  
   123  
   124  Remove object files and cached gomobile files
   125  
   126  Usage:
   127  
   128  	gomobile clean
   129  
   130  Clean removes object files and cached NDK files downloaded by gomobile init
   131  
   132  
   133  Build OpenAL for Android
   134  
   135  Usage:
   136  
   137  	gomobile init [-openal dir]
   138  
   139  If a OpenAL source directory is specified with -openal, init will
   140  build an Android version of OpenAL for use with gomobile build
   141  and gomobile install.
   142  
   143  
   144  Compile android APK and install on device
   145  
   146  Usage:
   147  
   148  	gomobile install [-target android] [build flags] [package]
   149  
   150  Install compiles and installs the app named by the import path on the
   151  attached mobile device.
   152  
   153  Only -target android is supported. The 'adb' tool must be on the PATH.
   154  
   155  The build flags -a, -i, -n, -x, -gcflags, -ldflags, -tags, -trimpath, and -work are
   156  shared with the build command.
   157  For documentation, see 'go help build'.
   158  
   159  
   160  Print version
   161  
   162  Usage:
   163  
   164  	gomobile version
   165  
   166  Version prints versions of the gomobile binary and tools
   167  */
   168  package main // import "golang.org/x/mobile/cmd/gomobile"