Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit bcfaadd6 authored by Michael Bestas's avatar Michael Bestas
Browse files

fixup! Etar: Use generateBp plugin

Change-Id: Iecc624942f89deefe8094ce77fd969c0def29f4d
parent fc466020
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
import com.android.build.gradle.internal.tasks.factory.dependsOn
import org.lineageos.generatebp.GenerateBpPlugin
import org.lineageos.generatebp.GenerateBpPluginExtension
import org.lineageos.generatebp.models.Module

plugins {
	id("com.android.application")
@@ -6,6 +9,20 @@ plugins {
	id("org.ec4j.editorconfig")
}

apply {
	plugin<GenerateBpPlugin>()
}

buildscript {
	repositories {
		maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.9/.m2")
	}

	dependencies {
		classpath("org.lineageos:gradle-generatebp:+")
	}
}

editorconfig {
	excludes = listOf("external/**", "metadata/**", "**/*.webp")
}
@@ -142,4 +159,16 @@ dependencies {
	implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version")
}

configure<GenerateBpPluginExtension> {
	targetSdk.set(android.defaultConfig.targetSdk!!)
	availableInAOSP.set { module: Module ->
		when {
			module.group.startsWith("androidx") -> true
			module.group.startsWith("com.google") -> true
			module.group.startsWith("org.jetbrains") -> true
			else -> false
		}
	}
}

tasks.preBuild.dependsOn(":aarGen")

app/generatebp.gradle.kts

deleted100644 → 0
+0 −29
Original line number Diff line number Diff line
import org.lineageos.generatebp.GenerateBpPlugin
import org.lineageos.generatebp.GenerateBpPluginExtension
import org.lineageos.generatebp.models.Module

apply {
    plugin<GenerateBpPlugin>()
}

buildscript {
    repositories {
        maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.9/.m2")
    }

    dependencies {
        classpath("org.lineageos:gradle-generatebp:+")
    }
}

configure<GenerateBpPluginExtension> {
    targetSdk.set(extra.get("targetSdk") as Int)
    availableInAOSP.set { module: Module ->
        when {
            module.group.startsWith("androidx") -> true
            module.group.startsWith("com.google") -> true
            module.group.startsWith("org.jetbrains") -> true
            else -> false
        }
    }
}