all: update Go version to 1.18
Fixes golang/go#62415
Change-Id: Ica46a62f60b8ebcf6244da98fe4e0643206cb24f
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/525095
Reviewed-by: Dmitri Shuralyov <[email protected]>
Run-TryBot: Hajime Hoshi <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Auto-Submit: Hajime Hoshi <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
diff --git a/app/android.go b/app/android.go
index 08a6e05..ebbd4b5 100644
--- a/app/android.go
+++ b/app/android.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build android
-// +build android
/*
Android Apps are built with -buildmode=c-shared. They are loaded by a
diff --git a/app/app.go b/app/app.go
index 19efb07..9817e13 100644
--- a/app/app.go
+++ b/app/app.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux || darwin || windows
-// +build linux darwin windows
package app
diff --git a/app/darwin_desktop.go b/app/darwin_desktop.go
index 3377175..180c602 100644
--- a/app/darwin_desktop.go
+++ b/app/darwin_desktop.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin && !ios
-// +build darwin,!ios
package app
diff --git a/app/darwin_ios.go b/app/darwin_ios.go
index 8fb30fe..bef9f42 100644
--- a/app/darwin_ios.go
+++ b/app/darwin_ios.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin && ios
-// +build darwin,ios
package app
diff --git a/app/internal/callfn/callfn.go b/app/internal/callfn/callfn.go
index 7a3d050..ecc3d45 100644
--- a/app/internal/callfn/callfn.go
+++ b/app/internal/callfn/callfn.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build android && (arm || 386 || amd64 || arm64)
-// +build android
-// +build arm 386 amd64 arm64
// Package callfn provides an android entry point.
//
diff --git a/app/internal/testapp/testapp.go b/app/internal/testapp/testapp.go
index eb85095..18a97bf 100644
--- a/app/internal/testapp/testapp.go
+++ b/app/internal/testapp/testapp.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux
-// +build darwin linux
// Small test app used by app/app_test.go.
package main
diff --git a/app/shiny.go b/app/shiny.go
index dd1722a..0b4e3e5 100644
--- a/app/shiny.go
+++ b/app/shiny.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build windows
-// +build windows
package app
diff --git a/app/x11.go b/app/x11.go
index ec8c90a..7e85e13 100644
--- a/app/x11.go
+++ b/app/x11.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && !android
-// +build linux,!android
package app
diff --git a/asset/asset.go b/asset/asset.go
index 5ed3a5c..d236569 100644
--- a/asset/asset.go
+++ b/asset/asset.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
-// +build darwin linux windows
package asset
diff --git a/asset/asset_darwin_armx.go b/asset/asset_darwin_armx.go
index 3eac25b..e3b3b5a 100644
--- a/asset/asset_darwin_armx.go
+++ b/asset/asset_darwin_armx.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin && (arm || arm64)
-// +build darwin
-// +build arm arm64
package asset
diff --git a/asset/asset_desktop.go b/asset/asset_desktop.go
index a360995..af7c45f 100644
--- a/asset/asset_desktop.go
+++ b/asset/asset_desktop.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (linux && !android) || (darwin && !arm && !arm64) || windows
-// +build linux,!android darwin,!arm,!arm64 windows
package asset
diff --git a/bind/implicit.go b/bind/implicit.go
index 5144209..bf1d418 100644
--- a/bind/implicit.go
+++ b/bind/implicit.go
@@ -1,7 +1,6 @@
// This file imports implicit dependencies required by generated code.
//go:build mobile_implicit
-// +build mobile_implicit
package bind
diff --git a/bind/testdata/testpkg/tagged.go b/bind/testdata/testpkg/tagged.go
index b5fe898..701a580 100644
--- a/bind/testdata/testpkg/tagged.go
+++ b/bind/testdata/testpkg/tagged.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aaa && bbb
-// +build aaa,bbb
// This file tests that tags work with gomobile.
package testpkg
diff --git a/cmd/gobind/implicit.go b/cmd/gobind/implicit.go
index 4289d4b..e8f6dd5 100644
--- a/cmd/gobind/implicit.go
+++ b/cmd/gobind/implicit.go
@@ -1,7 +1,6 @@
// This file imports implicit dependencies required by generated code.
//go:build mobile_implicit
-// +build mobile_implicit
package main
diff --git a/cmd/gomobile/gendex.go b/cmd/gomobile/gendex.go
index bfc2ad7..be470a2 100644
--- a/cmd/gomobile/gendex.go
+++ b/cmd/gomobile/gendex.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
-// +build ignore
// Gendex generates a dex file used by Go apps created with gomobile.
//
diff --git a/cmd/gomobile/tools.go b/cmd/gomobile/tools.go
index e8d4ade..bee4600 100644
--- a/cmd/gomobile/tools.go
+++ b/cmd/gomobile/tools.go
@@ -1,7 +1,6 @@
// This file includes the tools the gomobile depends on.
//go:build tools
-// +build tools
package main
diff --git a/example/basic/main.go b/example/basic/main.go
index 94932db..fb6167b 100644
--- a/example/basic/main.go
+++ b/example/basic/main.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
-// +build darwin linux windows
// An app that draws a green triangle on a red background.
//
diff --git a/example/basic/main_x.go b/example/basic/main_x.go
index 52e8c53..49d8612 100644
--- a/example/basic/main_x.go
+++ b/example/basic/main_x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !darwin && !linux && !windows
-// +build !darwin,!linux,!windows
package main
diff --git a/example/flappy/game.go b/example/flappy/game.go
index 89b8ae2..04903c7 100644
--- a/example/flappy/game.go
+++ b/example/flappy/game.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux
-// +build darwin linux
package main
diff --git a/example/flappy/main.go b/example/flappy/main.go
index 6f298ea..b0970f5 100644
--- a/example/flappy/main.go
+++ b/example/flappy/main.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux
-// +build darwin linux
// Flappy Gopher is a simple one-button game that uses the
// mobile framework and the experimental sprite engine.
diff --git a/example/flappy/main_x.go b/example/flappy/main_x.go
index 6739924..a056c79 100644
--- a/example/flappy/main_x.go
+++ b/example/flappy/main_x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !darwin && !linux
-// +build !darwin,!linux
package main
diff --git a/example/ivy/tools.go b/example/ivy/tools.go
index 85a6069..ab067c2 100644
--- a/example/ivy/tools.go
+++ b/example/ivy/tools.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
-// +build ignore
package dummy
diff --git a/example/network/main.go b/example/network/main.go
index 4b23cbe..5ac2f2c 100644
--- a/example/network/main.go
+++ b/example/network/main.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
-// +build darwin linux windows
// An app that paints green if golang.org is reachable when the app first
// starts, or red otherwise.
diff --git a/example/network/main_x.go b/example/network/main_x.go
index 9bda7ac..e6cd778 100644
--- a/example/network/main_x.go
+++ b/example/network/main_x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !darwin && !linux && !windows
-// +build !darwin,!linux,!windows
package main
diff --git a/exp/app/debug/fps.go b/exp/app/debug/fps.go
index bef808d..c015705 100644
--- a/exp/app/debug/fps.go
+++ b/exp/app/debug/fps.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
-// +build darwin linux windows
// Package debug provides GL-based debugging tools for apps.
package debug // import "golang.org/x/mobile/exp/app/debug"
diff --git a/exp/audio/al/al.go b/exp/audio/al/al.go
index b02cbb7..9744889 100644
--- a/exp/audio/al/al.go
+++ b/exp/audio/al/al.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
-// +build darwin linux windows
// Package al provides OpenAL Soft bindings for Go.
//
diff --git a/exp/audio/al/al_notandroid.go b/exp/audio/al/al_notandroid.go
index 577fee3..06fee46 100644
--- a/exp/audio/al/al_notandroid.go
+++ b/exp/audio/al/al_notandroid.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || (linux && !android) || windows
-// +build darwin linux,!android windows
package al
diff --git a/exp/audio/al/alc.go b/exp/audio/al/alc.go
index f0b4215..1c9c442 100644
--- a/exp/audio/al/alc.go
+++ b/exp/audio/al/alc.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
-// +build darwin linux windows
package al
diff --git a/exp/audio/al/alc_notandroid.go b/exp/audio/al/alc_notandroid.go
index 68e907c..a87df64 100644
--- a/exp/audio/al/alc_notandroid.go
+++ b/exp/audio/al/alc_notandroid.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || (linux && !android) || windows
-// +build darwin linux,!android windows
package al
diff --git a/exp/audio/al/const.go b/exp/audio/al/const.go
index aef0543..2408cbe 100644
--- a/exp/audio/al/const.go
+++ b/exp/audio/al/const.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
-// +build darwin linux windows
package al
diff --git a/exp/f32/gen.go b/exp/f32/gen.go
index fdd1c3f..2af3327 100644
--- a/exp/f32/gen.go
+++ b/exp/f32/gen.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
-// +build ignore
package main
diff --git a/exp/font/font.go b/exp/font/font.go
index c145134..02e2b97 100644
--- a/exp/font/font.go
+++ b/exp/font/font.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux || darwin
-// +build linux darwin
package font
diff --git a/exp/font/font_linux.go b/exp/font/font_linux.go
index 6531623..f0beb34 100644
--- a/exp/font/font_linux.go
+++ b/exp/font/font_linux.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !android
-// +build !android
package font
diff --git a/exp/font/font_test.go b/exp/font/font_test.go
index c93c282..f987525 100644
--- a/exp/font/font_test.go
+++ b/exp/font/font_test.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux || darwin
-// +build linux darwin
package font
diff --git a/exp/gl/glutil/context_darwin_desktop.go b/exp/gl/glutil/context_darwin_desktop.go
index 344c73e..725cdd2 100644
--- a/exp/gl/glutil/context_darwin_desktop.go
+++ b/exp/gl/glutil/context_darwin_desktop.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin && !ios
-// +build darwin,!ios
package glutil
diff --git a/exp/gl/glutil/context_x11.go b/exp/gl/glutil/context_x11.go
index 394f1b1..826b026 100644
--- a/exp/gl/glutil/context_x11.go
+++ b/exp/gl/glutil/context_x11.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && !android
-// +build linux,!android
package glutil
diff --git a/exp/gl/glutil/glimage.go b/exp/gl/glutil/glimage.go
index ffe953d..72a205f 100644
--- a/exp/gl/glutil/glimage.go
+++ b/exp/gl/glutil/glimage.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux || darwin || windows
-// +build linux darwin windows
package glutil
diff --git a/exp/gl/glutil/glimage_test.go b/exp/gl/glutil/glimage_test.go
index 975e305..2468303 100644
--- a/exp/gl/glutil/glimage_test.go
+++ b/exp/gl/glutil/glimage_test.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || (linux && !android)
-// +build darwin linux,!android
// TODO(crawshaw): Run tests on other OSs when more contexts are supported.
diff --git a/exp/gl/glutil/glutil.go b/exp/gl/glutil/glutil.go
index 18b0911..880b97e 100644
--- a/exp/gl/glutil/glutil.go
+++ b/exp/gl/glutil/glutil.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
-// +build darwin linux windows
package glutil // import "golang.org/x/mobile/exp/gl/glutil"
diff --git a/exp/sensor/android.go b/exp/sensor/android.go
index ad8a98b..a448614 100644
--- a/exp/sensor/android.go
+++ b/exp/sensor/android.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build android
-// +build android
package sensor
diff --git a/exp/sensor/darwin_armx.go b/exp/sensor/darwin_armx.go
index 2c8df04..699a7aa 100644
--- a/exp/sensor/darwin_armx.go
+++ b/exp/sensor/darwin_armx.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin && (arm || arm64)
-// +build darwin
-// +build arm arm64
package sensor
diff --git a/exp/sensor/notmobile.go b/exp/sensor/notmobile.go
index 3362e54..dc6f328 100644
--- a/exp/sensor/notmobile.go
+++ b/exp/sensor/notmobile.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (linux && !android) || (darwin && !arm && !arm64) || windows
-// +build linux,!android darwin,!arm,!arm64 windows
package sensor
diff --git a/exp/sprite/glsprite/glsprite.go b/exp/sprite/glsprite/glsprite.go
index 4f2522b..1e9fa0c 100644
--- a/exp/sprite/glsprite/glsprite.go
+++ b/exp/sprite/glsprite/glsprite.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
-// +build darwin linux windows
// Package glsprite implements a sprite Engine using OpenGL ES 2.
//
diff --git a/gl/gendebug.go b/gl/gendebug.go
index 2e6563c..146826f 100644
--- a/gl/gendebug.go
+++ b/gl/gendebug.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
-// +build ignore
// The gendebug program takes gl.go and generates a version of it
// where each function includes tracing code that writes its arguments
@@ -885,8 +884,7 @@
// Code generated from gl.go using go generate. DO NOT EDIT.
// See doc.go for details.
-// +build darwin linux openbsd windows
-// +build gldebug
+//go:build (darwin || linux || openbsd || windows) && gldebug
package gl
diff --git a/gl/gl.go b/gl/gl.go
index 195a309..28e747b 100644
--- a/gl/gl.go
+++ b/gl/gl.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin || linux || openbsd || windows) && !gldebug
-// +build darwin linux openbsd windows
-// +build !gldebug
package gl
diff --git a/gl/gldebug.go b/gl/gldebug.go
index 5a4bf71..fb79bb7 100644
--- a/gl/gldebug.go
+++ b/gl/gldebug.go
@@ -6,8 +6,6 @@
// See doc.go for details.
//go:build (darwin || linux || openbsd || windows) && gldebug
-// +build darwin linux openbsd windows
-// +build gldebug
package gl
diff --git a/gl/types_debug.go b/gl/types_debug.go
index b6dbaaa..ea01170 100644
--- a/gl/types_debug.go
+++ b/gl/types_debug.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin || linux || openbsd || windows) && gldebug
-// +build darwin linux openbsd windows
-// +build gldebug
package gl
diff --git a/gl/types_prod.go b/gl/types_prod.go
index e1c8b42..f87f91f 100644
--- a/gl/types_prod.go
+++ b/gl/types_prod.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin || linux || openbsd || windows) && !gldebug
-// +build darwin linux openbsd windows
-// +build !gldebug
package gl
diff --git a/gl/work.go b/gl/work.go
index 65eaf9a..c603adf 100644
--- a/gl/work.go
+++ b/gl/work.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || openbsd
-// +build darwin linux openbsd
package gl
diff --git a/gl/work_other.go b/gl/work_other.go
index b4b48f4..3bc597d 100644
--- a/gl/work_other.go
+++ b/gl/work_other.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (!cgo || (!darwin && !linux && !openbsd)) && !windows
-// +build !cgo !darwin,!linux,!openbsd
-// +build !windows
package gl
diff --git a/go.mod b/go.mod
index 56984a7..3b81433 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module golang.org/x/mobile
-go 1.17
+go 1.18
require (
golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63
diff --git a/internal/binres/genarsc.go b/internal/binres/genarsc.go
index 4ec35fb..2e71f29 100644
--- a/internal/binres/genarsc.go
+++ b/internal/binres/genarsc.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
-// +build ignore
// Genarsc generates stripped down version of android.jar resources used
// for validation of manifest entries.