Skip to content

Commit

Permalink
update tested versions (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielittner authored Jan 1, 2024
1 parent 94f54e1 commit 9cdd2d5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 24 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,16 @@ enum class AgpVersion(
minJdkVersion = JavaVersion.VERSION_17,
),

// canary channel
// beta channel
AGP_8_3(
value = "8.3.0-alpha17",
value = "8.3.0-beta01",
minGradleVersion = GradleVersion.GRADLE_8_1,
minJdkVersion = JavaVersion.VERSION_17,
),

// canary channel
AGP_8_4(
value = "8.4.0-alpha01",
minGradleVersion = GradleVersion.GRADLE_8_1,
minJdkVersion = JavaVersion.VERSION_17,
),
Expand All @@ -63,7 +70,7 @@ enum class KotlinVersion(
KT_1_9_21("1.9.21"),

// beta
KT_2_0_0("2.0.0-Beta1"),
KT_2_0_0("2.0.0-Beta2"),
;

companion object {
Expand All @@ -87,6 +94,11 @@ enum class GradleVersion(
GRADLE_8_5(
value = "8.5",
),

// rc
GRADLE_8_6(
value = "8.6-rc-1",
),
;

companion object {
Expand Down
43 changes: 33 additions & 10 deletions plugin/src/main/kotlin/com/vanniktech/maven/publish/Platform.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.android.build.api.dsl.LibraryExtension
import com.vanniktech.maven.publish.tasks.JavadocJar.Companion.javadocJarTask
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.attributes.DocsType
import org.gradle.api.internal.project.ProjectInternal
import org.gradle.api.plugins.JavaPluginExtension
Expand Down Expand Up @@ -191,7 +192,7 @@ data class AndroidSingleVariantLibrary @JvmOverloads constructor(
* be added to the publication.
*
* If the [includedBuildTypeValues] and [includedFlavorDimensionsAndValues] parameters are not provided or
* empty all variants will be published. Otherwise only variants matching those filters will be included.
* empty all variants will be published. Otherwise, only variants matching those filters will be included.
*
* Equivalent Gradle set up (AGP 7.1.1):
* android {
Expand Down Expand Up @@ -551,15 +552,37 @@ private fun setupTestFixtures(project: Project, sourcesJar: Boolean) {
val extension = project.extensions.getByType(JavaPluginExtension::class.java)
val testFixturesSourceSet = extension.sourceSets.maybeCreate(testFixtureSourceSetName)

val sourceElements = JvmPluginsHelper.createDocumentationVariantWithArtifact(
testFixturesSourceSet.sourcesElementsConfigurationName,
testFixtureSourceSetName,
DocsType.SOURCES,
listOf(ProjectDerivedCapability(project, "testFixtures")),
testFixturesSourceSet.sourcesJarTaskName,
testFixturesSourceSet.allSource,
project as ProjectInternal,
)
val sourceElements = if (GradleVersion.current() >= GradleVersion.version("8.6-rc-1")) {
JvmPluginsHelper.createDocumentationVariantWithArtifact(
testFixturesSourceSet.sourcesElementsConfigurationName,
testFixtureSourceSetName,
DocsType.SOURCES,
setOf(ProjectDerivedCapability(project, "testFixtures")),
testFixturesSourceSet.sourcesJarTaskName,
testFixturesSourceSet.allSource,
project as ProjectInternal,
)
} else {
JvmPluginsHelper::class.java.getMethod(
"createDocumentationVariantWithArtifact",
String::class.java,
String::class.java,
String::class.java,
List::class.java,
String::class.java,
Object::class.java,
ProjectInternal::class.java,
).invoke(
null,
testFixturesSourceSet.sourcesElementsConfigurationName,
testFixtureSourceSetName,
DocsType.SOURCES,
listOf(ProjectDerivedCapability(project, "testFixtures")),
testFixturesSourceSet.sourcesJarTaskName,
testFixturesSourceSet.allSource,
project as ProjectInternal,
) as Configuration
}

val component = JavaPluginHelper.getJavaComponent(project) as DefaultJvmSoftwareComponent
component.addVariantsFromConfiguration(sourceElements, JavaConfigurationVariantMapping("compile", true))
Expand Down

0 comments on commit 9cdd2d5

Please sign in to comment.