diff --git a/build.gradle.kts b/build.gradle.kts index 8de0a38a5..a8461f632 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,4 +14,10 @@ * limitations under the License. */ -group = "org.teavm" \ No newline at end of file +plugins { + idea +} + +group = "org.teavm" + +idea.module.excludeDirs.add(File(rootDir, "build-dir")) \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index 69d04b0e9..5a5a37d1d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -15,7 +15,6 @@ # mkdir -p build-dir -mkdir -p build-cache/maven-repository git fetch git archive master | tar -x -C build-dir || { echo 'Git archive failed' ; exit 1; } @@ -44,14 +43,25 @@ function deploy_teavm { echo "Building version $TEAVM_DEPLOY_VERSION_FULL" - ./gradlew build || { echo 'Build failed' ; return 1; } - ./gradlew publishAllPublicationsToMavenRepository || { echo 'Deploy failed' ; return 1; } + GRADLE="./gradlew" + GRADLE+=" --no-daemon --no-configuration-cache" + GRADLE+=" -Pteavm.project.version=$TEAVM_DEPLOY_VERSION_FULL" + GRADLE+=" -Pteavm.publish.url=sftp://$TEAVM_DEPLOY_SERVER/maven/repository" + GRADLE+=" -Pteavm.publish.username=$TEAVM_DEPLOY_LOGIN" + GRADLE+=" -Pteavm.publish.password=$TEAVM_DEPLOY_PASSWORD" + + $GRADLE build -x test || { echo 'Build failed' ; return 1; } + $GRADLE publishAllPublicationsToTeavmRepository || { echo 'Deploy failed' ; return 1; } + + curl -T tools/idea/build/distributions/idea-$TEAVM_DEPLOY_VERSION_FULL.zip \ + sftp://$TEAVM_DEPLOY_SERVER/idea/teavm-idea-$TEAVM_DEPLOY_VERSION_FULL.zip \ + --user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD cat <idea-repository.xml - - + + TeaVM support @@ -59,7 +69,7 @@ EOF curl --output badge.svg "https://img.shields.io/static/v1?label=download&message=$TEAVM_DEPLOY_VERSION_FULL&color=green" cat <htaccess -Redirect /maven/_latest /maven/repository/org/teavm/teavm-cli/$TEAVM_DEPLOY_VERSION_FULL/teavm-cli-$TEAVM_DEPLOY_VERSION_FULL.jar +Redirect /maven/_latest /maven/repository/org/teavm/teavm-cli/$TEAVM_DEPLOY_VERSION_FULL/teavm-cli-$TEAVM_DEPLOY_VERSION_FULL-all.jar EOF echo "$TEAVM_DEPLOY_BUILD" >build-number.txt @@ -72,23 +82,22 @@ deploy_teavm EXIT_CODE=$? if [[ "$EXIT_CODE" == '0' ]] ; then curl -T build-number.txt \ - ftp://$TEAVM_DEPLOY_SERVER/maven/versions/$TEAVM_DEPLOY_VERSION.txt \ + sftp://$TEAVM_DEPLOY_SERVER/maven/versions/$TEAVM_DEPLOY_VERSION.txt \ --user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD curl -T commit-id.txt \ - ftp://$TEAVM_DEPLOY_SERVER/maven/versions/$TEAVM_DEPLOY_VERSION_FULL-commit.txt \ + sftp://$TEAVM_DEPLOY_SERVER/maven/versions/$TEAVM_DEPLOY_VERSION_FULL-commit.txt \ --user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD curl -T badge.svg \ - ftp://$TEAVM_DEPLOY_SERVER/maven/badge.svg \ + sftp://$TEAVM_DEPLOY_SERVER/maven/badge.svg \ --user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD curl -T htaccess \ - ftp://$TEAVM_DEPLOY_SERVER/maven/.htaccess \ + sftp://$TEAVM_DEPLOY_SERVER/maven/.htaccess \ --user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD curl -T idea-repository.xml \ - ftp://$TEAVM_DEPLOY_SERVER/idea/dev/teavmRepository.xml \ + sftp://$TEAVM_DEPLOY_SERVER/idea/dev/teavmRepository.xml \ --user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD fi popd -rm -rf build-dir -rm -rf build-cache/maven-repository/org/teavm -exit $EXIT_CODE +#rm -rf build-dir +#exit $EXIT_CODE diff --git a/tools/gradle/build.gradle.kts b/tools/gradle/build.gradle.kts index 546c63345..bc2de720e 100644 --- a/tools/gradle/build.gradle.kts +++ b/tools/gradle/build.gradle.kts @@ -17,7 +17,7 @@ plugins { `java-gradle-plugin` publishing - `maven-publish` + `teavm-publish` } dependencies {