Skip to content

Commit

Permalink
Only turn on sdk 30 for release, during debug we have work to do
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Aug 2, 2021
1 parent 53a2c06 commit 3d6a3aa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -3,7 +3,7 @@
This file lists the main changes with each version of the Fyne toolkit.
More detailed release notes can be found on the [releases page](https://github.com/fyne-io/fyne/releases).

## 2.0.4 - 3 August 2021
## 2.0.4 - 4 August 2021

### Changed

Expand Down
4 changes: 2 additions & 2 deletions cmd/fyne/internal/mobile/binres/binres.go
Expand Up @@ -205,7 +205,7 @@ var skipSynthesize bool

// UnmarshalXML decodes an AndroidManifest.xml document returning type XML
// containing decoded resources.
func UnmarshalXML(r io.Reader, withIcon bool) (*XML, error) {
func UnmarshalXML(r io.Reader, withIcon bool, targetSDK int) (*XML, error) {
tbl, err := OpenTable()
if err != nil {
return nil, err
Expand Down Expand Up @@ -281,7 +281,7 @@ func UnmarshalXML(r io.Reader, withIcon bool) (*XML, error) {
Space: androidSchema,
Local: "targetSdkVersion",
},
Value: "30",
Value: strconv.Itoa(targetSDK),
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/fyne/internal/mobile/build.go
Expand Up @@ -143,7 +143,7 @@ func runBuildImpl(cmd *command) (*packages.Package, error) {
}
return pkg, nil
}
nmpkgs, err = goAndroidBuild(pkg, buildBundleID, targetArchs, cmd.IconPath, cmd.AppName, cmd.Version, cmd.Build)
nmpkgs, err = goAndroidBuild(pkg, buildBundleID, targetArchs, cmd.IconPath, cmd.AppName, cmd.Version, cmd.Build, buildRelease)
if err != nil {
return nil, err
}
Expand Down
8 changes: 6 additions & 2 deletions cmd/fyne/internal/mobile/build_androidapp.go
Expand Up @@ -24,7 +24,7 @@ import (
)

func goAndroidBuild(pkg *packages.Package, bundleID string, androidArchs []string,
iconPath, appName, version string, build int) (map[string]bool, error) {
iconPath, appName, version string, build int, release bool) (map[string]bool, error) {
ndkRoot, err := ndkRoot()
if err != nil {
return nil, err
Expand Down Expand Up @@ -209,7 +209,11 @@ func goAndroidBuild(pkg *packages.Package, bundleID string, androidArchs []strin
}
}

bxml, err := binres.UnmarshalXML(bytes.NewReader(manifestData), arsc.iconPath != "")
target := 30
if !release {
target = 29 // TODO once we have gomobile debug signing working for v2 android signs
}
bxml, err := binres.UnmarshalXML(bytes.NewReader(manifestData), arsc.iconPath != "", target)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 3d6a3aa

Please sign in to comment.