plugins {
	id 'java'
	id 'idea'
	id 'maven-publish'
	id 'signing'
	id "com.github.ben-manes.versions" version "0.52.0"
	id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}

subprojects {
	java {
		sourceCompatibility = JavaVersion.VERSION_11
		targetCompatibility = JavaVersion.VERSION_11
	}

	repositories {
		mavenLocal()
		mavenCentral()
		maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
		maven { url = "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
		maven { url = "https://central.sonatype.com/repository/maven-snapshots/" }
	}

	version = "1.3.1"

	ext {
		flatLafVersion = "3.6.1"
	}
}

nexusPublishing {
	repositories {
		// see https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration
		sonatype {
			nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
			snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
			stagingProfileId.set("io.github.andrewauclair")
		}
	}
}
