Android Demo 调试完成

This commit is contained in:
ZhanGSKen 2025-03-12 02:03:29 +08:00
parent afd93d6871
commit 2f33574d5c
10 changed files with 124 additions and 18 deletions

View File

View File

@ -1,25 +1,74 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply from: '../.winboll/winboll_app_build.gradle'
apply from: '../.winboll/winboll_lint_build.gradle'
def genVersionName(def versionName){
//
assert (winbollBuildProps['stageCount'] != null)
assert (winbollBuildProps['baseVersion'] != null)
//
winbollBuildProps.setProperty("baseVersion", "${versionName}");
//
FileOutputStream fos = new FileOutputStream(winbollBuildPropsFile)
winbollBuildProps.store(fos, "${winbollBuildPropsDesc}");
fos.close();
//
return "${versionName}." + winbollBuildProps['stageCount']
}
android { android {
compileSdkVersion 33 productFlavors {
buildToolsVersion "33.0.0" beta {
}
stage {
}
}
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig { defaultConfig {
applicationId "cc.winboll.studio.androiddemo" applicationId "cc.winboll.studio.androiddemo"
minSdkVersion 19 minSdkVersion 26
targetSdkVersion 26 targetSdkVersion 29
versionCode 1 versionCode 1
// versionName
// .winboll/winbollBuildProps.properties stageCount=0
// Gradle编译环境下合起来的 versionName "${versionName}.0"
versionName "1.0" versionName "1.0"
if(true) {
versionName = genVersionName("${versionName}")
}
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }
} }
dependencies { dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"]) api fileTree(dir: 'libs', include: ['*.jar'])
//
implementation 'com.github.getActivity:ToastUtils:10.5'
// Android
// https://mvnrepository.com/artifact/com.android.support/support-v4
implementation 'com.android.support:support-v4:28.0.0'
// https://mvnrepository.com/artifact/com.android.support/support-compat
implementation 'com.android.support:support-compat:28.0.0'
// https://mvnrepository.com/artifact/com.android.support/support-media-compat
implementation 'com.android.support:support-media-compat:28.0.0'
// https://mvnrepository.com/artifact/com.android.support/support-core-utils
implementation 'com.android.support:support-core-utils:28.0.0'
// https://mvnrepository.com/artifact/com.android.support/support-core-ui
implementation 'com.android.support:support-core-ui:28.0.0'
// https://mvnrepository.com/artifact/com.android.support/support-fragment
implementation 'com.android.support:support-fragment:28.0.0'
// https://mvnrepository.com/artifact/com.android.support/recyclerview-v7
implementation 'com.android.support:recyclerview-v7:28.0.0'
} }

View File

@ -0,0 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Tue Mar 11 18:02:14 GMT 2025
stageCount=0
libraryProject=
baseVersion=1.0
publishVersion=1.0.0
buildCount=1
baseBetaVersion=1.0.1

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" >
<application>
<!-- Put flavor specific code here -->
</application>
</manifest>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Android Demo +</string>
</resources>

View File

@ -1,9 +1,12 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<manifest <manifest
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="cc.winboll.studio.androiddemo"> package="cc.winboll.studio.androiddemo">
<application <application
tools:replace="android:appComponentFactory"
android:appComponentFactory="android.support.v4.app.CoreComponentFactory"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
@ -33,4 +36,4 @@
</application> </application>
</manifest> </manifest>

View File

@ -1,7 +1,16 @@
<LinearLayout <?xml version="1.0" encoding="utf-8"?>
xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent"> android:layout_width="match_parent"
android:layout_height="match_parent"
</LinearLayout> android:gravity="center_vertical|center_horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Android Demo"
android:textAppearance="?android:attr/textAppearanceLarge"/>
</LinearLayout>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">AndroidDemo</string> <string name="app_name">Android Demo</string>
</resources> </resources>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" >
<application>
<!-- Put flavor specific code here -->
</application>
</manifest>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Put flavor specific strings here -->
</resources>