walle_kit 1.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 60

walle_kit #

Build Status Codecov GitHub Tag Pub Package License

flutter版walle多渠道打包工具

flutter toolkit #

dart/flutter 私服 #

docs #

Android #

  • apply
// android/app/build.gradle
apply from: "${rootProject.findProject(":walle_kit").projectDir}/walle_kit.gradle"
  • without flavors
// android/app/build.gradle
walle {
    enabled = true

//    // https://github.com/v7lin/walle-docker
//    jarFile = file('script/walle-cli-all.jar') // 默认:file('script/walle-cli-all.jar')

    qihoo360 {
//        // https://github.com/v7lin/qihoo360-jiagu-docker
//        jiaguJarFile = file('script/jiagu/jiagu.jar') // 默认:file('script/jiagu/jiagu.jar')

        account = 'xxx'
        password = 'xxx'
        channelId = 'qihu360'
    }

    tencent {
//        // https://github.com/v7lin/tencentcloud-legu
//        leguJarFile = file('script/legu-all.jar') // 默认:file('script/legu-all.jar')

        secretId = 'xxx'
        secretKey = 'xxx'
//        region = 'ap-guangzhou' // 可选:'ap-guangzhou'、'ap-shanghai',默认:'ap-guangzhou'
        channelId = 'tencent'
    }

    outputDir = file("${project.buildDir}/outputs/apk/walle") // 默认:file("${project.buildDir}/outputs/apk/${flavorName}/${buildType}/walle")
    fileNameFormat = '${appName}-${buildType}-${channelId}.apk' // 默认:'${appName}-${buildType}-${channelId}.apk'
    channelFile = file('channel')
}
// android/app/build.gradle
android {
    walleConfigs {
        release {
            enabled = true

//            // https://github.com/v7lin/walle-docker
//            jarFile = file('script/walle-cli-all.jar') // 默认:file('script/walle-cli-all.jar')

            qihoo360 {
//                // https://github.com/v7lin/qihoo360-jiagu-docker
//                jiaguJarFile = file('script/jiagu/jiagu.jar') // 默认:file('script/jiagu/jiagu.jar')

                account = 'xxx'
                password = 'xxx'
                channelId = 'qihu360'
            }

            tencent {
//                // https://github.com/v7lin/tencentcloud-legu
//                leguJarFile = file('script/legu-all.jar') // 默认:file('script/legu-all.jar')

                secretId = 'xxx'
                secretKey = 'xxx'
//                region = 'ap-guangzhou' // 可选:'ap-guangzhou'、'ap-shanghai',默认:'ap-guangzhou'
                channelId = 'tencent'
            }

            outputDir = file("${project.buildDir}/outputs/apk/walle") // 默认:file("${project.buildDir}/outputs/apk/${flavorName}/${buildType}/walle")
            fileNameFormat = '${appName}-${buildType}-${channelId}.apk' // 默认:'${appName}-${buildType}-${channelId}.apk'
            channelFile = file('channel')
        }
    }
}

walle {
    enabled = false
}
  • flavors
// android/app/build.gradle
android {
    productFlavors {
        prod {
        }
    }

    walleConfigs {
        prod {
            enabled = true

//            // https://github.com/v7lin/walle-docker
//            jarFile = file('script/walle-cli-all.jar') // 默认:file('script/walle-cli-all.jar')

            qihoo360 {
//                // https://github.com/v7lin/qihoo360-jiagu-docker
//                jiaguJarFile = file('script/jiagu/jiagu.jar') // 默认:file('script/jiagu/jiagu.jar')

                account = 'xxx'
                password = 'xxx'
                channelId = 'qihu360'
            }

            tencent {
//                // https://github.com/v7lin/tencentcloud-legu
//                leguJarFile = file('script/legu-all.jar') // 默认:file('script/legu-all.jar')

                secretId = 'xxx'
                secretKey = 'xxx'
//                region = 'ap-guangzhou' // 可选:'ap-guangzhou'、'ap-shanghai',默认:'ap-guangzhou'
                channelId = 'tencent'
            }

            outputDir = file("${project.buildDir}/outputs/apk/walle") // 默认:file("${project.buildDir}/outputs/apk/${flavorName}/${buildType}/walle")
            fileNameFormat = '${appName}-${buildType}-${channelId}.apk' // 默认:'${appName}-${buildType}-${channelId}.apk'
            channelFile = file('channel')
        }
    }
}

walle {
    enabled = false
}

iOS #

# 不支持

Flutter #

  • snapshot
dependencies:
  walle_kit:
    git:
      url: https://github.com/v7lin/walle_kit.git
  • release
dependencies:
  walle_kit: ^${latestTag}

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

1.1.0 #

  • 优化

1.0.1 #

  • 优化

1.0.0 #

  • 优化

0.1.0 #

  • 添加文档

0.0.1 #

  • walle

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:walle_kit/walle_kit.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _channelId = '';

  @override
  void initState() {
    super.initState();
    _initChannelId();
  }

  Future<void> _initChannelId() async {
    String channelId = await Walle.getChannelId();

    if (!mounted) {
      return;
    }

    setState(() {
      _channelId = channelId ?? '';
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('walle_kit'),
        ),
        body: Center(
          child: Text('channelId: $_channelId\n'),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  walle_kit: ^1.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:walle_kit/walle_kit.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
28
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Jul 11, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform Linux

Because:

  • package:walle_kit/walle_kit.dart that declares support for platforms: Android, iOS

Package does not support Flutter platform Web

Because:

  • package:walle_kit/walle_kit.dart that declares support for platforms: Android, iOS

Package does not support Flutter platform Windows

Because:

  • package:walle_kit/walle_kit.dart that declares support for platforms: Android, iOS

Package does not support Flutter platform macOS

Because:

  • package:walle_kit/walle_kit.dart that declares support for platforms: Android, iOS

Package not compatible with SDK dart

Because:

  • walle_kit that is a package requiring null.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/v7lin/walle_kit was unreachable.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test
pedantic any