apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' android { compileSdkVersion 32 buildToolsVersion "30.0.3" defaultConfig { applicationId "com.kidozh.discuzhub" minSdkVersion 24 targetSdkVersion 32 versionCode 48 versionName "5.5" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" manifestPlaceholders = [ discuz_title: "NOT_IMPLEMENTED", discuz_base_url: "NOT_IMPLEMENTED", ] javaCompileOptions { annotationProcessorOptions { arguments += ["room.schemaLocation": "$projectDir/schemas".toString()] } } } buildTypes { release { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } single { // fill your bbs id manifestPlaceholders = [ discuz_title: "论坛名称(如:西北工业大学三行四方)", discuz_base_url: "服务网址(如:https://bbs.example.com)", ] proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' applicationIdSuffix ".bbs" } qzzn { // an example for QZZN BBS manifestPlaceholders = [ discuz_title: "QZZN论坛", discuz_base_url: "https://bbs.qzzn.com", ] proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' // be sure to change your own application id applicationIdSuffix ".qzzn" } keylol { // fill your bbs id manifestPlaceholders = [ discuz_title: "Keylol - 其乐", discuz_base_url: "https://keylol.com", ] proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' applicationIdSuffix ".keylol" } debug { manifestPlaceholders = [ discuz_title: "QZZN论坛", discuz_base_url: "https://bbs.qzzn.com", ] debuggable true pseudoLocalesEnabled true applicationIdSuffix ".debug" } } // flavorDimensions "version" // productFlavors{ // // single { // dimension "version" // applicationId 'com.example.bbs' // } // } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } buildFeatures{ dataBinding = true viewBinding = true } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.3' def material_version = '1.6.0-alpha02' implementation "com.google.android.material:material:$material_version" api "com.google.android.material:material:$material_version" implementation 'androidx.legacy:legacy-support-v13:1.0.0' // CardView implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.preference:preference-ktx:1.2.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.annotation:annotation:1.3.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' implementation 'androidx.navigation:navigation-fragment-ktx:2.4.0' implementation 'androidx.navigation:navigation-ui-ktx:2.4.0' implementation 'androidx.recyclerview:recyclerview:1.2.1' // For control over item selection of both touch and mouse driven selection implementation "androidx.recyclerview:recyclerview-selection:1.1.0" testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' def glide_version = '4.12.0' implementation "com.github.bumptech.glide:glide:$glide_version" implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version" kapt "com.github.bumptech.glide:compiler:$glide_version" def lifecycle_version = '2.4.0' // ViewModel and LiveData // ViewModel implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" // LiveData implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" // Saved state module for ViewModel implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version" // alternately - if using Java8, use the following instead of lifecycle-compiler implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" // optional - ReactiveStreams support for LiveData implementation "androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version" // ViewModel implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" // LiveData implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" // optional - helpers for implementing LifecycleOwner in a Service implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version" // optional - ProcessLifecycleOwner provides a lifecycle for the whole application process implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version" // alternately - if using Java8, use the following instead of lifecycle-compiler implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" def room_version = '2.4.1' // or, for latest rc, use "1.1.1-rc1" implementation "androidx.room:room-runtime:$room_version" implementation("androidx.room:room-paging:$room_version") //annotationProcessor "androidx.room:room-compiler:$room_version" kapt "androidx.room:room-compiler:$room_version" // optional - Kotlin Extensions and Coroutines support for Room implementation "androidx.room:room-ktx:$room_version" //Activity implementation 'androidx.activity:activity-ktx:1.4.0' implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1' implementation 'org.jsoup:jsoup:1.14.3' implementation 'com.github.GrenderG:Toasty:1.3.0' implementation 'androidx.mediarouter:mediarouter:1.2.6' def work_version = '2.7.1' // (Java only) implementation "androidx.work:work-runtime:$work_version" def jackson_version = '2.13.1' implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version" implementation("com.fasterxml.jackson.module:jackson-module-parameter-names:$jackson_version") implementation 'org.jsoup:jsoup:1.14.3' // for guava implementation 'com.google.guava:guava:31.0.1-jre' api 'com.google.guava:guava:31.0.1-jre' implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" // for material drawer implementation 'androidx.annotation:annotation:1.3.0' // Add for NavController support def lastestMaterialDrawerRelease = '8.4.2' implementation "com.mikepenz:materialdrawer:${lastestMaterialDrawerRelease}" implementation "com.mikepenz:materialdrawer-nav:${lastestMaterialDrawerRelease}" // Add for Android-Iconics support implementation "com.mikepenz:materialdrawer-iconics:${lastestMaterialDrawerRelease}" def paging_version = '3.1.0' implementation "androidx.paging:paging-runtime-ktx:$paging_version" def retrofit_version = "2.9.0" implementation "com.squareup.retrofit2:retrofit:$retrofit_version" implementation "com.squareup.retrofit2:converter-jackson:$retrofit_version" implementation 'jp.wasabeef:recyclerview-animators:4.0.2' // logging interceptor implementation('com.github.ihsanbal:LoggingInterceptor:3.1.0') { exclude group: 'org.json', module: 'json' } // okhttp implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.4' // larger screen support implementation("androidx.window:window:1.0.0") implementation("androidx.startup:startup-runtime:1.1.0") } repositories { mavenCentral() }