thorium-fork/app/build.gradle

176 lines
6.5 KiB
Groovy
Raw Normal View History

plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-parcelize'
id 'kotlin-kapt'
}
2018-03-02 16:10:13 -08:00
ext.readProperty = { paramName -> readPropertyWithDefault(paramName, null) }
ext.readPropertyWithDefault = { paramName, defaultValue ->
if (project.hasProperty(paramName)) {
return project.getProperties().get(paramName)
} else {
Properties properties = new Properties()
if (project.rootProject.file('local.properties').exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}
if (properties.getProperty(paramName) != null) {
return properties.getProperty(paramName)
} else {
return defaultValue
}
}
}
2020-08-29 13:33:23 -07:00
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
2018-03-02 16:10:13 -08:00
android {
2020-06-21 08:01:15 -07:00
compileSdkVersion 29
2021-10-01 11:14:49 -07:00
buildToolsVersion "30.0.2"
2021-01-13 12:31:05 -08:00
2018-03-02 16:10:13 -08:00
defaultConfig {
applicationId "net.schueller.peertube"
minSdkVersion 21
2020-06-21 08:01:15 -07:00
targetSdkVersion 29
versionCode 1060
versionName "1.4.0"
2020-07-08 03:31:30 -07:00
buildConfigField "long", "BUILD_TIME", readPropertyWithDefault('buildTimestamp', System.currentTimeMillis()) + 'L'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2021-01-13 12:31:05 -08:00
2020-06-21 08:01:15 -07:00
javaCompileOptions {
annotationProcessorOptions {
arguments = [
"room.schemaLocation" : "$projectDir/schemas".toString(),
"room.incremental" : "true",
"room.expandProjection": "true"]
}
}
2018-03-02 16:10:13 -08:00
}
2020-08-29 13:33:23 -07:00
signingConfigs {
release {
// You need to specify either an absolute path or include the
// keystore file in the same directory as the build.gradle file.
storeFile file("../android-signing-keystore.jks")
storePassword "${secretProperties['signing_keystore_password']}"
keyAlias "${secretProperties['signing_key_alias']}"
keyPassword "${secretProperties['signing_key_password']}"
}
}
2018-03-02 16:10:13 -08:00
buildTypes {
release {
minifyEnabled false
2020-08-29 13:33:23 -07:00
testCoverageEnabled false
2018-03-02 16:10:13 -08:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2020-08-29 13:33:23 -07:00
signingConfig signingConfigs.release
2018-03-02 16:10:13 -08:00
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
2018-11-10 08:48:09 -08:00
applicationVariants.all { variant ->
variant.resValue "string", "versionName", variant.versionName
}
buildFeatures{
viewBinding = true
}
2018-03-02 16:10:13 -08:00
}
def room_version = "2.3.0"
def lifecycleVersion = '2.3.1'
def exoplayer = '2.15.1'
def fragment_version = "1.3.6"
2021-01-13 12:31:05 -08:00
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
2020-06-21 08:01:15 -07:00
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
2021-01-13 12:31:05 -08:00
// Layouts and design
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
2021-01-13 12:31:05 -08:00
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation "androidx.fragment:fragment-ktx:$fragment_version"
2021-01-13 12:31:05 -08:00
2021-01-23 15:31:51 -08:00
implementation 'de.hdodenhof:circleimageview:3.1.0'
2021-01-13 12:31:05 -08:00
// font awesome
2021-01-23 15:31:51 -08:00
implementation 'com.mikepenz:iconics-core:5.2.4'
implementation 'com.mikepenz:fontawesome-typeface:5.9.0.2-kotlin@aar'
2021-01-13 12:31:05 -08:00
// http client / REST
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
2021-01-13 12:31:05 -08:00
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
// image downloading and caching library
implementation 'com.squareup.picasso:picasso:2.71828'
// json decoder/encoder
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
// Torrents and WebRTC
implementation 'com.github.TorrentStream:TorrentStream-Android:2.7.0'
// implementation "com.github.TorrentStream:TorrentStreamServer-Android:1.0.1"
// implementation 'org.webrtc:google-webrtc:1.0.+'
// video player repo:jcenter()
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer"
implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayer"
implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayer"
implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayer"
implementation "com.google.android.exoplayer:exoplayer-smoothstreaming:$exoplayer"
implementation "com.google.android.exoplayer:extension-mediasession:$exoplayer"
implementation "com.google.android.exoplayer:extension-okhttp:$exoplayer"
// date formatter, do not update past 4.0.4 https://github.com/sschueller/peertube-android/issues/262
implementation 'org.ocpsoft.prettytime:prettytime:4.0.4.Final'
2021-01-13 12:31:05 -08:00
// Version comparison
2021-01-23 15:31:51 -08:00
implementation 'org.apache.maven:maven-artifact:3.6.3'
2020-06-21 08:01:15 -07:00
// database lib
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
2020-06-21 08:01:15 -07:00
// Lifecycle components
2021-01-13 12:31:05 -08:00
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycleVersion"
kapt "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
2020-06-21 08:01:15 -07:00
implementation 'androidx.preference:preference-ktx:1.1.1'
2021-01-13 12:31:05 -08:00
// testing
2021-01-23 15:31:51 -08:00
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.room:room-testing:$room_version"
2018-12-17 09:11:41 -08:00
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
2021-01-31 14:35:16 -08:00
}