mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-02-09 18:46:47 +01:00
build: migrate to Kotlin DSL (#151)
Co-authored-by: PatrickMis <24607131+PatrickMis@users.noreply.github.com>
This commit is contained in:
parent
b97c6005f0
commit
f47cc8b375
@ -1,44 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.android.application'
|
|
||||||
id 'org.jetbrains.kotlin.android'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdk 32
|
|
||||||
buildToolsVersion "32.0.0"
|
|
||||||
namespace 'app.revanced.integrations'
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
applicationId "app.revanced.integrations"
|
|
||||||
minSdk 23
|
|
||||||
targetSdk 32
|
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
multiDexEnabled false
|
|
||||||
|
|
||||||
Properties properties = new Properties()
|
|
||||||
if (rootProject.file("local.properties").exists()) {
|
|
||||||
properties.load(rootProject.file("local.properties").newDataInputStream())
|
|
||||||
}
|
|
||||||
|
|
||||||
buildConfigField "String", "YT_API_KEY", "\"${properties.getProperty("youtubeAPIKey", "")}\""
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
|
||||||
}
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '11'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly 'androidx.annotation:annotation:1.5.0'
|
|
||||||
}
|
|
47
app/build.gradle.kts
Normal file
47
app/build.gradle.kts
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import java.io.FileInputStream
|
||||||
|
import java.util.Properties
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("org.jetbrains.kotlin.android")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk = 32
|
||||||
|
buildToolsVersion = "32.0.0"
|
||||||
|
namespace = "app.revanced.integrations"
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "app.revanced.integrations"
|
||||||
|
minSdk = 23
|
||||||
|
targetSdk = 32
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0"
|
||||||
|
multiDexEnabled = false
|
||||||
|
|
||||||
|
val properties = Properties()
|
||||||
|
if (rootProject.file("local.properties").exists()) {
|
||||||
|
properties.load(FileInputStream(rootProject.file("local.properties")))
|
||||||
|
}
|
||||||
|
|
||||||
|
buildConfigField("String", "YT_API_KEY", "\"${properties.getProperty("youtubeAPIKey", "")}\"")
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility(JavaVersion.VERSION_11)
|
||||||
|
targetCompatibility(JavaVersion.VERSION_11)
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly("androidx.annotation:annotation:1.5.0")
|
||||||
|
}
|
33
build.gradle
33
build.gradle
@ -1,33 +0,0 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:7.3.0'
|
|
||||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10'
|
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
|
||||||
// in the individual module build.gradle files
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
maven { url 'https://jitpack.io' }
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tracking issue https://github.com/semantic-release/semantic-release/issues/963
|
|
||||||
task publish(type: DefaultTask) {
|
|
||||||
group = 'publish'
|
|
||||||
description = 'Dummy publish to pass the verification phase of the gradle-semantic-release-plugin'
|
|
||||||
}
|
|
||||||
|
|
||||||
task clean(type: Delete) {
|
|
||||||
delete rootProject.buildDir
|
|
||||||
}
|
|
24
build.gradle.kts
Normal file
24
build.gradle.kts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath("com.android.tools.build:gradle:7.3.0")
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
|
||||||
|
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tracking issue https://github.com/semantic-release/semantic-release/issues/963
|
||||||
|
tasks.register("publish", DefaultTask::class) {
|
||||||
|
group = "publish"
|
||||||
|
description = "Dummy publish to pass the verification phase of the gradle-semantic-release-plugin"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("clean", Delete::class) {
|
||||||
|
delete(rootProject.buildDir)
|
||||||
|
}
|
@ -1,4 +1,3 @@
|
|||||||
org.gradle.jvmargs = -Xmx2048m
|
org.gradle.jvmargs = -Xmx2048m
|
||||||
android.useAndroidX = true
|
android.useAndroidX = true
|
||||||
android.enableJetifier = true
|
|
||||||
version = 0.41.1
|
version = 0.41.1
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
include ':app'
|
|
||||||
rootProject.name = "integrations"
|
|
10
settings.gradle.kts
Normal file
10
settings.gradle.kts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
dependencyResolutionManagement {
|
||||||
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
maven { url = uri("https://jitpack.io") }
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
include(":app")
|
||||||
|
rootProject.name = "integrations"
|
Loading…
x
Reference in New Issue
Block a user