-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- implement new JUnit extension to help set up and re-run DGP integration tests with different versions
- Loading branch information
Showing
65 changed files
with
9,792 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
dokka-integration-tests/gradle/projects/it-android-0-v2/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
plugins { | ||
id("com.android.library") /* %{AGP_VERSION} */ | ||
id("org.jetbrains.dokka") /* %{DGP_VERSION} */ | ||
kotlin("android") /* %{KGP_VERSION} */ | ||
} | ||
|
||
android { | ||
namespace = "org.jetbrains.dokka.it.android" | ||
defaultConfig { | ||
minSdkVersion(21) | ||
setCompileSdkVersion(29) | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("androidx.appcompat:appcompat:1.1.0") | ||
} |
64 changes: 64 additions & 0 deletions
64
dokka-integration-tests/gradle/projects/it-android-0-v2/settings.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
rootProject.name = "it-android-0" | ||
|
||
pluginManagement { | ||
repositories { | ||
/* %{DOKKA_IT_MAVEN_REPO}% */ | ||
mavenCentral() | ||
google() | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
@Suppress("UnstableApiUsage") | ||
dependencyResolutionManagement { | ||
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) | ||
repositories { | ||
/* %{DOKKA_IT_MAVEN_REPO}% */ | ||
|
||
mavenCentral() | ||
google() | ||
|
||
//region Declare the Node.js & Yarn download repositories - workaround for https://youtrack.jetbrains.com/issue/KT-51379 | ||
ivy("https://nodejs.org/dist/") { | ||
name = "Node Distributions at $url" | ||
patternLayout { artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]") } | ||
metadataSources { artifact() } | ||
content { includeModule("org.nodejs", "node") } | ||
} | ||
ivy("https://github.com/yarnpkg/yarn/releases/download") { | ||
name = "Yarn Distributions at $url" | ||
patternLayout { artifact("v[revision]/[artifact](-v[revision]).[ext]") } | ||
metadataSources { artifact() } | ||
content { includeModule("com.yarnpkg", "yarn") } | ||
} | ||
//endregion | ||
|
||
//region Declare Kotlin/Native dependencies - workaround for https://youtrack.jetbrains.com/issue/KT-51379 | ||
// Remove this repo when the only supported KGP version is above 2.0.0 | ||
ivy("https://download.jetbrains.com/kotlin/native/builds") { | ||
name = "Kotlin Native" | ||
patternLayout { | ||
|
||
// example download URLs: | ||
// https://download.jetbrains.com/kotlin/native/builds/releases/1.7.20/linux-x86_64/kotlin-native-prebuilt-linux-x86_64-1.7.20.tar.gz | ||
// https://download.jetbrains.com/kotlin/native/builds/releases/1.7.20/windows-x86_64/kotlin-native-prebuilt-windows-x86_64-1.7.20.zip | ||
// https://download.jetbrains.com/kotlin/native/builds/releases/1.7.20/macos-x86_64/kotlin-native-prebuilt-macos-x86_64-1.7.20.tar.gz | ||
listOf( | ||
"macos-x86_64", | ||
"macos-aarch64", | ||
"osx-x86_64", | ||
"osx-aarch64", | ||
"linux-x86_64", | ||
"windows-x86_64" | ||
).forEach { os -> | ||
listOf("dev", "releases").forEach { stage -> | ||
artifact("$stage/[revision]/$os/[artifact]-[revision].[ext]") | ||
} | ||
} | ||
} | ||
metadataSources { artifact() } | ||
content { includeModuleByRegex(".*", ".*kotlin-native-prebuilt.*") } | ||
} | ||
//endregion | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
dokka-integration-tests/gradle/projects/it-android-0-v2/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- | ||
~ Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
--> | ||
|
||
<manifest package="org.jetbrains.dokka.it.android"/> |
16 changes: 16 additions & 0 deletions
16
...on-tests/gradle/projects/it-android-0-v2/src/main/java/it/android/AndroidSpecificClass.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@file:Suppress("unused") | ||
|
||
package it.android | ||
|
||
import android.content.Context | ||
import android.util.SparseIntArray | ||
import android.view.View | ||
|
||
/** | ||
* This class is specific to android and uses android classes like: | ||
* [Context], [SparseIntArray] or [View] | ||
*/ | ||
class AndroidSpecificClass { | ||
fun sparseIntArray() = SparseIntArray() | ||
fun createView(context: Context): View = View(context) | ||
} |
22 changes: 22 additions & 0 deletions
22
...tests/gradle/projects/it-android-0-v2/src/main/java/it/android/IntegrationTestActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package it.android | ||
|
||
import android.annotation.SuppressLint | ||
import android.os.Bundle | ||
import android.widget.TextView | ||
import androidx.appcompat.app.AppCompatActivity | ||
|
||
/** | ||
* Some Activity implementing [AppCompatActivity] from android x | ||
*/ | ||
class IntegrationTestActivity : AppCompatActivity() { | ||
/** | ||
* Will show a small happy text | ||
*/ | ||
@SuppressLint("SetTextI18n") | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
val textView = TextView(this) | ||
textView.text = "I am so happy :)" | ||
setContentView(textView) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.