Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix android minsdk usage in binres #99

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/gomobile/build_androidapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
)

func goAndroidBuild(pkg *packages.Package, targets []targetInfo) (map[string]bool, error) {
binres.MinSDK = buildAndroidAPI
ndkRoot, err := ndkRoot(targets...)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion internal/binres/binres.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func UnmarshalXML(r io.Reader, withIcon bool) (*XML, error) {
Space: "",
Local: "platformBuildVersionCode",
},
Value: "16",
Value: fmt.Sprintf("%v", MinSDK),
},
xml.Attr{
Name: xml.Name{
Expand Down
4 changes: 3 additions & 1 deletion internal/binres/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import (
)

// MinSDK is the targeted sdk version for support by package binres.
const MinSDK = 16
var (
MinSDK = 16
)

func apiResources() ([]byte, error) {
apiResPath, err := apiResourcesPath()
Expand Down