Skip to content

Commit 94f6525

Browse files
committed
1、上传build.gradle
1 parent c2aaf33 commit 94f6525

File tree

5 files changed

+93
-4
lines changed

5 files changed

+93
-4
lines changed

android/app/build.gradle

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withReader('UTF-8') { reader ->
5+
localProperties.load(reader)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15+
if (flutterVersionCode == null) {
16+
flutterVersionCode = '1'
17+
}
18+
19+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20+
if (flutterVersionName == null) {
21+
flutterVersionName = '1.0'
22+
}
23+
24+
apply plugin: 'com.android.application'
25+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26+
27+
android {
28+
compileSdkVersion 28
29+
30+
lintOptions {
31+
disable 'InvalidPackage'
32+
}
33+
34+
defaultConfig {
35+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36+
applicationId "ccy.wanandroid_flutter"
37+
minSdkVersion 16
38+
targetSdkVersion 28
39+
versionCode flutterVersionCode.toInteger()
40+
versionName flutterVersionName
41+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42+
}
43+
44+
buildTypes {
45+
release {
46+
// TODO: Add your own signing config for the release build.
47+
// Signing with the debug keys for now, so `flutter run --release` works.
48+
signingConfig signingConfigs.debug
49+
}
50+
}
51+
}
52+
53+
flutter {
54+
source '../..'
55+
}
56+
57+
dependencies {
58+
testImplementation 'junit:junit:4.12'
59+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
60+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
61+
}

android/build.gradle

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
buildscript {
2+
repositories {
3+
google()
4+
jcenter()
5+
}
6+
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:3.2.1'
9+
}
10+
}
11+
12+
allprojects {
13+
repositories {
14+
google()
15+
jcenter()
16+
}
17+
}
18+
19+
rootProject.buildDir = '../build'
20+
subprojects {
21+
project.buildDir = "${rootProject.buildDir}/${project.name}"
22+
}
23+
subprojects {
24+
project.evaluationDependsOn(':app')
25+
}
26+
27+
task clean(type: Delete) {
28+
delete rootProject.buildDir
29+
}

lib/page/home/home_page.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
33
import 'package:wanandroid_flutter/http/index.dart';
44
import 'package:wanandroid_flutter/page/base/custom_sliver_app_bar_delegate.dart';
55
import 'package:wanandroid_flutter/page/home/project/project_page.dart';
6-
import 'package:wanandroid_flutter/page/todo/todo_main.dart';
76
import 'package:wanandroid_flutter/res/index.dart';
87
import 'package:wanandroid_flutter/test/test_page.dart';
98
import 'package:wanandroid_flutter/utils/index.dart';

lib/page/home/project/project_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class _ProjectSubPageState extends State<ProjectSubPage>
107107
isLoading = true;
108108
await Future.delayed(Duration(seconds: 2));
109109
Response res = await ProjectApi.getNewProjects(page);
110-
await dio.get('https://www.wanandroid.com/lg/collect/list/0/json');
110+
// await dio.get('https://www.wanandroid.com/lg/collect/list/0/json');
111111
BaseEntity baseEntity = BaseEntity.fromJson(res.data);
112112
BaseListEntity<List> baseListEntity =
113113
BaseListEntity.fromJson(baseEntity.data);

pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated by pub
2-
# See https://dart.dev/tools/pub/glossary#lockfile
2+
# See https://www.dartlang.org/tools/pub/glossary#lockfile
33
packages:
44
analyzer:
55
dependency: transitive
@@ -374,7 +374,7 @@ packages:
374374
name: pedantic
375375
url: "https://pub.flutter-io.cn"
376376
source: hosted
377-
version: "1.7.0"
377+
version: "1.5.0"
378378
pool:
379379
dependency: transitive
380380
description:

0 commit comments

Comments
 (0)