-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Progress towards mpp * Mpp config * Get ank working again. Also publicly expose some internals * Maybe working publishing?
- Loading branch information
Showing
35 changed files
with
959 additions
and
1,675 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
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,25 @@ | ||
name: CI | ||
|
||
on: | ||
release: | ||
types: | ||
- released | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: setup-java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Wrapper validation | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Build | ||
run: | | ||
chmod +x gradlew | ||
env BINTRAY_USER=jannis BINTRAY_API_KEY=${{ secrets.BINTRAY_API_KEY }} ./gradlew publish |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,53 @@ | ||
buildscript { | ||
ext { | ||
arrow_version = "0.10.5" | ||
kotlinVersion = "1.3.61" | ||
arrow_version = "0.11.0" | ||
kotlinVersion = "1.4.31" | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
maven { | ||
url "https://plugins.gradle.org/m2/" | ||
} | ||
maven { url 'https://dl.bintray.com/arrow-kt/arrow-kt/' } | ||
} | ||
dependencies { | ||
classpath "me.champeau.gradle:jmh-gradle-plugin:0.5.0" | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" | ||
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion" | ||
classpath "io.arrow-kt:arrow-ank-gradle:$arrow_version" | ||
classpath "io.arrow-kt:arrow-ank-gradle:0.10.5" | ||
} | ||
} | ||
|
||
// ank setup, kotlin project + sources from both subprojects | ||
apply plugin: 'ank-gradle-plugin' | ||
apply plugin: 'kotlin' | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" | ||
implementation project(":kotlin-pretty") | ||
implementation project(":kotlin-pretty-ansi") | ||
} | ||
|
||
compileKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
compileTestKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
|
||
ank { | ||
source = file("docs/contentIn") | ||
target = file("docs/content") | ||
classpath = sourceSets.main.runtimeClasspath | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
maven { | ||
url "https://plugins.gradle.org/m2/" | ||
} | ||
maven { url 'https://dl.bintray.com/arrow-kt/arrow-kt/' } | ||
maven { url 'https://dl.bintray.com/jannis/kotlin-pretty' } | ||
maven { url 'https://dl.bintray.com/jannis/kparsec' } | ||
maven { url 'https://dl.bintray.com/jannis/propCheck-kt' } | ||
} | ||
} | ||
|
||
subprojects { proj -> | ||
group = GROUP | ||
version = VERSION_NAME | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: 'kotlin-multiplatform' | ||
|
||
compileKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
compileTestKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
kotlin { | ||
explicitApi = 'strict' | ||
} | ||
} | ||
|
||
// ank setup | ||
apply plugin: 'ank-gradle-plugin' | ||
apply plugin: 'kotlin' | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" | ||
implementation project(":kotlin-pretty") | ||
implementation project(":kotlin-pretty-ansi") | ||
} | ||
|
||
ank { | ||
source = file("docs/contentIn") | ||
target = file("docs/content") | ||
classpath = sourceSets.main.runtimeClasspath | ||
} |
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
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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
kotlin.code.style=official | ||
GROUP=kotlin-pretty | ||
VERSION_NAME=0.5.2 | ||
VERSION_NAME=0.6.0 | ||
|
||
# Publication | ||
RELEASE_REPOSITORY=https://api.bintray.com/maven/jannis/kotlin-pretty/kotlin-pretty | ||
POM_DESCRIPTION=Easy to use, extensible pretty-printer | ||
POM_URL=https://github.com/1Jajen1/kotlin-pretty | ||
POM_SCM_URL=https://github.com/1Jajen1/kotlin-pretty | ||
POM_SCM_CONNECTION=scm:git:git://github.com/1Jajen1/kotlin-pretty.git | ||
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/1Jajen1/kotlin-pretty.git | ||
POM_LICENCE_NAME=BSD-3 | ||
POM_LICENCE_URL=https://github.com/1Jajen1/kotlin-pretty/blob/master/LICENSEtxt | ||
POM_LICENCE_URL=https://github.com/1Jajen1/kotlin-pretty/blob/master/LICENSE.txt | ||
POM_LICENCE_DIST=repo | ||
POM_DEVELOPER_ID=jannis | ||
POM_DEVELOPER_NAME="Jannis Overesch" | ||
|
||
kotlin.native.ignoreDisabledTargets=true |
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 |
---|---|---|
@@ -1,103 +1,60 @@ | ||
import org.apache.tools.ant.taskdefs.condition.Os | ||
|
||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
def findProperty(String key) { | ||
[project.properties[key], System.getenv(key)].find { it != null } | ||
def windowsPublications = ["mingwX64", "mingwX86"] | ||
def macosPublications = kotlin.targets.names.findAll { | ||
it.startsWith("macos") || it.startsWith("ios") || it.startsWith("watchos") || it.startsWith("tvos") | ||
} | ||
def linuxPublications = publishing.publications.names - macosPublications - windowsPublications | ||
|
||
def getReleaseRepositoryUrl() { | ||
return findProperty('RELEASE_REPOSITORY_URL') ?: "https://api.bintray.com/maven/jannis/kotlin-pretty/kotlin-pretty" | ||
def publicationsFromThisPlatform = { | ||
if (Os.isFamily(Os.FAMILY_WINDOWS)) return windowsPublications | ||
else if (Os.isFamily(Os.FAMILY_MAC)) return macosPublications | ||
else if (Os.isFamily(Os.FAMILY_UNIX)) return linuxPublications | ||
else error("Expected either a windows, mac or linux host") | ||
} | ||
|
||
def getRepositoryUsername() { | ||
return findProperty('BINTRAY_USER') ?: "no.bintray.user" | ||
} | ||
|
||
def getRepositoryPassword() { | ||
return findProperty('BINTRAY_KEY') ?: "no.bintray.api.key" | ||
} | ||
|
||
uploadArchives { | ||
repositories.mavenDeployer { | ||
pom.groupId = GROUP | ||
pom.artifactId = POM_ARTIFACT_ID | ||
pom.version = VERSION_NAME | ||
|
||
repository(url: getReleaseRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
} | ||
|
||
pom.project { | ||
name POM_NAME | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
distribution POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
kotlin { | ||
publishing { | ||
repositories { | ||
maven { | ||
credentials { | ||
username "$System.env.BINTRAY_USER" | ||
password "$System.env.BINTRAY_API_KEY" | ||
} | ||
url = RELEASE_REPOSITORY | ||
} | ||
} | ||
} | ||
} | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
pom.groupId = GROUP | ||
pom.artifactId = POM_ARTIFACT_ID | ||
pom.version = VERSION_NAME | ||
|
||
pom.project { | ||
name POM_NAME | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
distribution POM_LICENCE_DIST | ||
def targetPublications = publicationsFromThisPlatform() | ||
tasks.withType(AbstractPublishToMaven) | ||
.configureEach { | ||
onlyIf { it.publication.name in targetPublications } | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
publications.withType(MavenPublication).all { | ||
pom { | ||
name = POM_NAME | ||
description = POM_DESCRIPTION | ||
url = POM_URL | ||
scm { | ||
url = POM_SCM_URL | ||
connection = POM_SCM_CONNECTION | ||
developerConnection = POM_SCM_DEV_CONNECTION | ||
} | ||
licenses { | ||
license { | ||
name = POM_LICENCE_NAME | ||
url = POM_LICENCE_URL | ||
distribution = POM_LICENCE_DIST | ||
} | ||
} | ||
developers { | ||
developer { | ||
name = "Jannis" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource + 'build/generated/source/kapt/main', 'build/generated/source/kaptKotlin/main' | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
} |
Oops, something went wrong.