Skip to content

Commit

Permalink
Added more APKs and java-test-fixtures (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzo authored Dec 4, 2024
1 parent dad74c1 commit fb12676
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
12 changes: 8 additions & 4 deletions demo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import java.lang.Thread.sleep

plugins {
java
jacoco
`java-test-fixtures`
alias(libs.plugins.kotlin.jvm)
id("io.github.gmazzo.aar2jar")
jacoco
}

java.toolchain.languageVersion = JavaLanguageVersion.of(libs.versions.java.get())

dependencies {
implementation(libs.androidx.fragment)
compileOnly(libs.demo.android)
testFixturesApi(libs.demo.android)

implementation(libs.demo.androidx.fragment)
testFixturesApi(libs.demo.androidx.browser)
testImplementation(libs.demo.androidx.camera)

testImplementation(platform(libs.junit.bom))
testImplementation(libs.junit.params)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.github.gmazzo.gradle.aar2jar.demo

import android.app.Application
import android.content.Context
import androidx.camera.view.PreviewView

object CameraHelper {

fun createCamera() = PreviewView(Application())

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.github.gmazzo.gradle.aar2jar.demo

import androidx.browser.browseractions.BrowserActionItem
import androidx.browser.customtabs.CustomTabsClient
import androidx.browser.customtabs.TrustedWebUtils

object BrowserHelper {

val utils = TrustedWebUtils::class

}
5 changes: 4 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ java = "17"
kotlin = "2.1.0"

[libraries]
androidx-fragment = { module = "androidx.fragment:fragment", version = "1.8.5" }
demo-android = { module = "com.google.android:android", version = "4.1.1.4" }
demo-androidx-browser = { module = "androidx.browser:browser", version = "1.8.0" }
demo-androidx-camera = { module = "androidx.camera:camera-view", version = "1.4.0" }
demo-androidx-fragment = { module = "androidx.fragment:fragment", version = "1.8.5" }
junit-bom = { module = "org.junit:junit-bom", version = "5.11.3" }
junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine" }
junit-params = { module = "org.junit.jupiter:junit-jupiter-params" }
Expand Down

0 comments on commit fb12676

Please sign in to comment.