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

Feat/macos builder support flavor #196

Merged
merged 4 commits into from
Jun 16, 2024
Merged

Conversation

lijy91
Copy link
Member

@lijy91 lijy91 commented Jun 15, 2024

No description provided.

@lijy91 lijy91 self-assigned this Jun 15, 2024
Copy link

vercel bot commented Jun 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
flutter-distributor-website ⬜️ Ignored (Inspect) Visit Preview Jun 16, 2024 1:22am

@lijy91 lijy91 linked an issue Jun 15, 2024 that may be closed by this pull request
@shubhamsinghmutualmobile

@lijy91 Is there a way for me to test this new code? I am using this:

fvm dart pub global activate -sgit https://github.com/leanflutter/flutter_distributor.git --git-path packages/flutter_distributor/ --git-ref 0abe930d073c0d679038a00c09e4388e5e55ebd8 --overwrite

but getting the following error:

Because every version of flutter_distributor from git depends on flutter_app_builder ^0.4.4 which doesn't match any versions, flutter_distributor from git is forbidden.
So, because pub global activate depends on flutter_distributor from git, version solving failed.

@lijy91
Copy link
Member Author

lijy91 commented Jun 16, 2024

Try this

git clone [email protected]:leanflutter/flutter_distributor.git
cd flutter_distributor
gh pr checkout 196
melos bs
melos activate

@shubhamsinghmutualmobile

Try this

git clone [email protected]:leanflutter/flutter_distributor.git
cd flutter_distributor
gh pr checkout 196
melos bs
melos activate

Still doesn't seem to work for me :( Do you think I might be doing something wrong?

Screenshot 2024-06-16 at 6 04 18 AM

@lijy91
Copy link
Member Author

lijy91 commented Jun 16, 2024

Can you try build the multiple_flavors example

cd examples/multiple_flavors 
./release.sh dmg-release

@lijy91 lijy91 force-pushed the feat/macos-builder-support-flavor branch from 0abe930 to 942b7dc Compare June 16, 2024 01:11
@lijy91 lijy91 force-pushed the feat/macos-builder-support-flavor branch from 942b7dc to 9c7e7ed Compare June 16, 2024 01:12
@lijy91 lijy91 force-pushed the feat/macos-builder-support-flavor branch from ff17fc9 to d4586a0 Compare June 16, 2024 01:21
@lijy91
Copy link
Member Author

lijy91 commented Jun 16, 2024

Please provide a screenshot of your scheme configuration, And your build/macos/Build/Products directory.

image

image

Logs for ./release.sh dmg-release:

===> Releasing dmg-release:dev
Packaging multiple_flavors 1.0.0+1 as dmg:
$ /Users/lijy91/fvm/versions/3.22.2/bin/flutter build macos --flavor dev --dart-define FLUTTER_BUILD_NAME=1.0.0 --dart-define FLUTTER_BUILD_NUMBER=1

Building macOS application...                                   
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-0004199C0A22401E, name:My Mac }
{ platform:macOS, arch:x86_64, id:00006000-0004199C0A22401E, name:My Mac }
✓ Built build/macos/Build/Products/Release-dev/multiple_flavors.app (28.9MB)
{
  "config": {
    "mode": "release",
    "flavor": "dev",
    "arguments": {
      "flavor": "dev"
    }
  },
  "outputDirectory": "build/macos/Build/Products/Release-dev",
  "duration": 5763,
  "outputFiles": [
    "./build/macos/Build/Products/Release-dev/multiple_flavors.app"
  ]
}
Successfully built Directory: 'build/macos/Build/Products/Release-dev' in 5s
$ cp -RH build/macos/Build/Products/Release-dev/multiple_flavors.app dist/1.0.0+1/multiple_flavors-dev-1.0.0(1)-macos_dmg
$ cp -RH macos/packaging/dmg/. dist/1.0.0+1/multiple_flavors-dev-1.0.0(1)-macos_dmg
$ appdmg dist/1.0.0+1/multiple_flavors-dev-1.0.0(1)-macos_dmg/make_config.json dist/1.0.0+1/multiple_flavors-dev-1.0.0(1)-macos.dmg

@shubhamsinghmutualmobile
Copy link

shubhamsinghmutualmobile commented Jun 16, 2024

Try this

git clone [email protected]:leanflutter/flutter_distributor.git
cd flutter_distributor
gh pr checkout 196
melos bs
melos activate

I did not realise that the command gh pr checkout 196 did not work for me. Hence, I was using the main branch to build the plugin 🤦 Apologies for that. I just verified that this PR is working fine on my project as well ✅

Screenshot 2024-06-16 at 7 20 08 AM

Although I see a new problem now i.e.

Error on line 10, column 16: Expected a key while parsing a block mapping.
   ╷
10 │     path: [DEV]Ember.app
   │                ^
   ╵

but I believe that's not a part of this discussion. We can discuss it in another issue.

For now, thank you for your quick support on this feature! 🙌

@lijy91 lijy91 merged commit fd496b2 into main Jun 16, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to change path build macos ???
2 participants